Comments (8)
In case anyone else needs this, solution for amazon found here: jhy/jsoup#976 just need to set User-Agent
from opengraphscraper.
if you're a noob like me, here is the full answer further to @TylerAHolden 's guidance
const ogs = require("open-graph-scraper");
const options = {
url: "https://amzn.to/2Is8sCR",
headers: {
"user-agent": "Googlebot/2.1 (+http://www.google.com/bot.html)",
},
};
ogs(options, (error, results, response) => {
console.log("error:", error); // This is returns true or false. True if there was a error. The error it self is inside the results object.
console.log("results:", results); // This contains all of the Open Graph results
console.log("response:", response); // This contains the HTML of page
});
from opengraphscraper.
Hello! Thanks for opening this issue.
In [email protected]
I updated the module to send back an array of all of the images on page if there isn't any open graph images.
from opengraphscraper.
@jshemas thanks, I think that’s definitely a good addition. Have you checked it against my example though? I think something more complicated might be happening here - if I view source on the page the scraper sees it doesn’t have the open graph tags yet so I don’t know what the Facebook scraper is doing differently?
from opengraphscraper.
Hello, i'm not able to use the Facebook debugger since I don't have a facebook account. Facebook is probably doing a lot more then just scraping open graph info. What other information would you like OGS to pull back?
I can probably do a one off thing to get amazon reviews, if that is what you need.
from opengraphscraper.
Hi @jshemas, again thanks for responding. It's not the reviews bit per se (that just seems to be something Amazon adds into its thumbnails) it's more just figuring out what's weird about how / when Amazon exposes og tags for its products. Seems weird what comes back from curl even.
from opengraphscraper.
It might not even be exposing og tags! But I'm sure I saw them on at least one product page!
from opengraphscraper.
No it does seem that Amazon doesn't expose opengraph tags after all, so Facebook must be making an exception to get this (maybe hitting an Amazon API). This all seems beyond the scope of open-graph-scraper
so I'm happy to close this issue.
from opengraphscraper.
Related Issues (20)
- TS Error: Cannot find module './lib/openGraphScraper' HOT 3
- Something is not right with the types HOT 4
- Type error in index.ts HOT 1
- Missing got dependency HOT 2
- Types Errors HOT 6
- Can the library keyv be replaced with something else? HOT 3
- fetchOptions type HOT 1
- Regression: Fetching `https://facebook.com` yields no image HOT 5
- Lower Node 18 requirement HOT 1
- Problem with specifying the html option in TypeScript HOT 1
- Why the error with a generic 400/500 error message? HOT 2
- Twitter / X.com Open graph tags not working anymore HOT 4
- It is better to export SuccessResult and ErrorResult types HOT 2
- Fail to detect charset from certain ShiftJIS page HOT 10
- Add Support for Edge Functions HOT 2
- Support title & description fields HOT 5
- Docker/ docker compose HOT 3
- Remove `charset` from result JSON HOT 2
- 6.5.0 update error HOT 7
- Constant error when running from a local server HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opengraphscraper.