Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching wrong image from amazon URLs #39

Open
LeonardoMantovani opened this issue Feb 6, 2022 · 2 comments
Open

Fetching wrong image from amazon URLs #39

LeonardoMantovani opened this issue Feb 6, 2022 · 2 comments

Comments

@LeonardoMantovani
Copy link

I'm using this plugin to fetch (and display) images connected to some urls in my app.
I tried this plugin with many sites and works perfectly, but with Amazon it returns me a wrong link.

For example, passing this link it returns me this image url (which is not the correct image) while metadata-fetching APIs such as LinkPreview.net return this one

Why is this happening? And how can I solve it? I would prefer not to use a proprietary third-party API.
(By the way, congratulations on the excellent work that the plugin does with the other sites!)

@6ami
Copy link

6ami commented Apr 22, 2022

same issue here have you found a fix @LeonardoMantovani ?

@LeonardoMantovani
Copy link
Author

Heyy, sorry for the late response.
After a bit of research, I supposed that Amazon isn't following the standard that other website follows, and this is why the plugin doesn't work with its urls...
Since I really needed that feature for Amazon urls too, I managed to fetch the image of the product by kind of ""reverse-engineering"" the HTML of Amazon product pages and then extracting the real image link from the html of the url's page.

I've written a little script in dart to do so, but I implemented it directly in the project I was working on

If you still need it, I may publish it as a standalone command line tool (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants