jsanahuja / jquery.instagramFeed

Instagram Feed without access token. Not using the Instagram API
MIT License
313 stars 164 forks source link

Some feeds provide 302 temporary redirect status codes and will not load images #136

Open pthurmond-vmlyr opened 3 years ago

pthurmond-vmlyr commented 3 years ago

I am finding that some feeds are providing 302 status codes, which is a redirect. But for some reason will not render the redirected image.

Example this fails: https://www.instagram.com/soapandglory/ But this one is fine: https://www.instagram.com/pjerky/

Yes, the second one is my very underused personal one. But I found this to be true in testing other feeds. Not sure what can be done about it to be honest.

JhonnyXD commented 3 years ago

Hi @pthurmond-vmlyr I have the same problem! I saw what is happening on the websites that move the caption on the images. In the examples on the official website the problem is also happening, see: https://www.sowecms.com/demos/InstagramFeed/#examples

@jsanahuja Is there any solution? Thank you all so much for your help.

romanklabal commented 3 years ago

Same issue here, across completely separate websites and separate IG usernames.

laryn commented 3 years ago

I'm seeing this same thing as well, on separate sites, separate IG users.

JhonnyXD commented 3 years ago

Is the problem happening again, any solution? On the official website the examples present problems too, so I believe it is a bug.

romanklabal commented 3 years ago

Pretty sure IG are tightening access to their data again, I am unable to load data via the __a=1 param that used to work for past few years.

laryn commented 3 years ago

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.instagram.com/graphql/query/?query_id=17888483320059182&variables={%22id%22:%2220311520%22,%22first%22:18,%22after%22:null}. (Reason: CORS request did not succeed).

Instagram Feed: Unable to fetch the given user/tag. Instagram responded with the status code: 0 5

sowecms-jquery-feed-errors

ctadlock commented 3 years ago

I think Instagram is rate limiting by the client IP address. It's not by website, Instagram account...

As a test for yourself.. for a website/account that is not working.. open that same site up on a different computer/phone that has a different public IP address. For me I did this my tethering my PC to my phone when it was on cellular data and not Wi-Fi.

Please report back your tests here to confirm this issue.

Morecoffee commented 3 years ago

I tried the same thing and it worked for a few reloads and then failed.

castellaniperez commented 3 years ago

Same here..... any updates?

JhonnyXD commented 3 years ago

I've been researching the problem and as I understand it, Instagram found a method to block requests for images. Even using a proxy this is occurring. Even if they manage to switch to another proxy server, later they will block again. :( Unfortunately I think it's the end :(

jonasmarco commented 3 years ago

Oh my !! All company websites where we used the plugin failed with this new Instagram block! Sad

maxlibin commented 3 years ago

+1

perryworld commented 3 years ago

I'm having the same problem on a lot of my websites Seems to show the placeholder and the text description but doesn't provide the images Any ideas on how to solve this ;o( Instagram

frogerfred commented 3 years ago

Same problem here :/

ribeiroeder commented 3 years ago

Hello, not wanting to be negative, but I believe that it will be very unlikely to find a solution since instagram is very strict in unauthenticated access.

As I have several sites that depend on a smilar script, I searched and improved two scripts that use the new official method via the graph.instagram API.

The first uses javascript and the second PHP cURL, I am still testing it but the results have been great.

laryn commented 3 years ago

Do you have public links?

ribeiroeder commented 3 years ago

jQuery Ajax for feed Instagram Graph API https://github.com/ribeiroeder/jquery-feed-instagram-graph

PHP cURL for feed Instagram Graph API https://github.com/ribeiroeder/php-curl-instagram-graph

@jsanahuja Sorry for posting another third party solution here, your script is incredible, much more complex and well developed than the scripts above and it helped me for a long time. But either way I need to be generating alternatives because customers keep asking about a solution :(

terryapodaca commented 3 years ago

I upgraded a site last week and found this issue on one of my sites. What a bummer because this was such a great script/plugin! Does this mean that there will likely not be a fix? I really didn't want to have to switch to a script that required Access Tokens/Keys...

@ribeiroeder how does your jQuery script work?

romanklabal commented 3 years ago

Nevermind working with a token, what is killing me is the fact that they expire after 2 months. Thats why this script was such a blessing. Fuck Instagram.

JhonnyXD commented 3 years ago

@romanklabal Truth! The problem with working with the Token is that it expires as you said. Another problem that we have to have access to our customers' account to generate the Token and this is very annoying! I don't understand why Instagram's TRASH does not allow public access to the Feed as it does with Facebook.

JhonnyXD commented 3 years ago

I understood that this script / plugin uses the Google proxy to access the images anonymously, here is an excerpt from the code: https://images"+~~(3333*Math.random())+"-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url="+b) Is there no other random proxy in this regard? Can anyone adapt something?

JhonnyXD commented 3 years ago

If someone has more time than me the name of the technique used in this script would be: Data scraping. <--- search google about it ... I'll see if I can help with anything around here and report back as soon as possible.

ribeiroeder commented 3 years ago

@terryapodaca My script uses the token as a base, it is practically a way that uses the official method to connect, I understand that it is boring to set up a token, but at the same time, this great plugin is causing us constant difficulties with instagram always finding a way to block.

@JhonnyXD I also find it very annoying to depend on accessing the customer's account to earn the first token.

@Romanklabal would like to be able to count on an automated solution to renew them.