metadata_fetch icon indicating copy to clipboard operation
metadata_fetch copied to clipboard

Fetching wrong image from amazon URLs

Open LeonardoMantovani opened this issue 3 years ago • 2 comments

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!)

LeonardoMantovani avatar Feb 06 '22 16:02 LeonardoMantovani

same issue here have you found a fix @LeonardoMantovani ?

6ami avatar Apr 22 '22 01:04 6ami

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 (?)

LeonardoMantovani avatar May 02 '22 20:05 LeonardoMantovani