-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Error when using getProfile() #283
Comments
This error was related to the Instagram profile you use to log in. You need to go to Instagram and check what it is connected with. In my case, when logging in, Instagram opened a modal window with a choice of date of birth, this was the problem |
I am getting Profile #1 : Unable to extract JSON data |
Hello,
Maybe Instagram updated its website and the regex should be updated ? |
Hi, |
Hi Team, |
Yep, came to the exact same conclusion - following for updates. Will let you know also what I discover, if anything. |
Some more information. I was using version 6.2.2 and currently scraping two accounts is failing with this error - three accounts are not. We scrape once every two hours. I then upgraded to the latest (currently 6.13.1) and while this did not solve it it did lead me to discover something that may help. I found that with version 6.2.2 I am able to scrape this account https://www.instagram.com/bulletproofconvertible, but with 6.13.1 I am not (I get this same "Unable to extract JSON data" error) However, regardless of which version I use I am unable to scrape my own feed https://www.instagram.com/gurubobnz, which gives the same message. I have logged onto the Instagram account that I am using as the scraper and there are no alerts or requirements for date of birth of any other thing I can see that might affect this. |
Some more information. We scrape the following URL's:
I upgraded to 6.13.1 and ALL of the above started to fail. Then when I rolled back to 6.2.2 the first four came right, with the final two still failing for the same reason. Perhaps this list will be helpful for someone else to verify whether they can or can't scrape those feeds. These are listed in chronological order of when we set up the scraper. It may just be coincidence but it is the last two on the list that are failing - again, with 6.2.2 and 6.13.1. Surely if there is a chronological reason it's not to do with when we set up, but may have something to do with the creation date of the instagram account. Could be way off the mark, just throwing that out there as a possibility. |
Hey @gurubobnz I just release a new version (6.15.0). I updated Thanks |
Hi, thank you for your prompt attention! Yes, this has fixed the problem for me - all feeds that I listed above are now loading just fine. Thanks heaps. |
Glad to read it. :D |
One final question please - even though 6.15.0 is the latest release on GitHub, when I install using composer I get 6.13.1 - is there a missing step to publish the latest version to the packagist database? I see that on https://packagist.org/packages/pgrimaud/instagram-user-feed it says "This package is auto-updated" - is it just a case of waiting? |
Damn, sometimes packagist doesn't auto update. I forced the update and it should work now |
Excellent. Yep, all sorted. Merci! |
Works also for me in development and production ! Thanks for the quick update 🚀 |
Upgrade solved the "Profile #1 : Unable to extract JSON data" error for me also. |
This seems to be fixed in 6.16.6. |
Version(s) affected: 6.13
Description
Instagram\Exception\InstagramFetchException : Profile #2 : Unable to extract JSON data
at /app/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/HtmlProfileDataFeed.php:64
60|
61| preg_match('/<script type="text\/javascript">window.__additionalDataLoaded([^,]*,(.+));</script>/', $html, $matches);
62|
63| if (!isset($matches[1])) {
The text was updated successfully, but these errors were encountered: