RSS-Bridge / rss-bridge

The RSS feed for websites missing it
https://rss-bridge.org/bridge01/
The Unlicense
7.22k stars 1.03k forks source link

Instagram images are not loaded #2005

Open muzzol opened 3 years ago

muzzol commented 3 years ago

Describe the bug Instagram bridge don't show images.

To Reproduce Type a username at Instagram bridge and get Atom

Expected behavior Images should appear

Additional context

The problem is IG gives this URL as image: https://www.instagram.com/p/CEPcDt_pJYH/media?size=l

and that URL is a redirection to real image: https://scontent-mad1-1.cdninstagram.com/v/t51.2885-15/e35/118131587_140064227784823_4653765523173956198_n.jpg

IG uses 301 sever code to achieve that, so IG bridge should point to final image instead of redirection.

you can easily try it with wget and any image:

wget https://www.instagram.com/p/CEPcDt_pJYH/media?size=l

ask if you need further info.

em92 commented 3 years ago

As workaround I suggest to enable "Use direct media links" option.

muzzol commented 3 years ago

I use CLI:

/usr/bin/php index.php action=display bridge=Instagram format=Atom direct_links=1 u=foofighters

Is this correct?

alternapop commented 3 years ago

As workaround I suggest to enable "Use direct media links" option.

This seems to work for my use case.

laBecasse commented 3 years ago

Hello, I am not able to see the images from instagram neither. I think it comes from the fact that the http header of the response for images contains "cross-origin-resource-policy: same-origin".

I did a test by exporting the feed of a user with :

curl "yourinstance?action=display&bridge=Instagram&context=Username&u=foofighters&media_type=all&direct_links=1&format=Html" > test.html

I hosted the result here: https://book.buron.coffee/notes/test.html

The image links are correct and there is no redirection, but there is this CORS header, which prevents the images to be loaded, as you can see in the chromium console Capture d’écran de 2021-05-30 19-16-21

dvikan commented 2 years ago

CORS doesnt affect resources loaded with <img src=""> as far as I know. Problem might be they expire links after x amount of days?