Giter Site home page Giter Site logo

CORS issues about metascraper HOT 5 CLOSED

microlinkhq avatar microlinkhq commented on August 31, 2024
CORS issues

from metascraper.

Comments (5)

blakeembrey avatar blakeembrey commented on August 31, 2024

This would probably just need a process.browser switch to create an XHR transport with credentials enabled in the browser (not tested, but I'm sure it'd just be caused by cookies not being attached). This would deviate from how node requests it but that's how it'd be fixed if you wanted it fixed.

from metascraper.

NullVoxPopuli avatar NullVoxPopuli commented on August 31, 2024

yeah -- I don't know how else to get the meta from other websites otherwise. :-\

from metascraper.

blakeembrey avatar blakeembrey commented on August 31, 2024

You can start with https://github.com/ianstormtaylor/metascraper/blob/27340b24e463397ad18aedb15f43546c0626b07e/lib/index.js#L26-L37 and replace the request mechanism. E.g.

function scrape (url, rules) {
  return popsicle.get({
    url: url,
    transport: popsicle.createTransport({ withCredentials: true })
  }).then(res => scrapeMetadata(res.body, url, rules))
}

from metascraper.

leeeejuy avatar leeeejuy commented on August 31, 2024

this solution is not working.
i replace this code but popsiscle.createTrasnport is not function error....
help me...

from metascraper.

Kikobeats avatar Kikobeats commented on August 31, 2024

Hello,

I'm going to close this because new 2.0.0 iteration doesn't handle HTTP layer anymore!

from metascraper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.