Open Waqas1o1 opened 2 years ago
Same here, and also for pictures.
Getting graphql errors here too.
2022-01-26 08:27:51 $user instalooter.cli[6048] NOTICE Starting download of `xxxx`
2022-01-26 08:27:55 $user instalooter.cli[6048] CRITICAL 'graphql'
It seems like instagram now loads "PostPage" contents dynamically so a simple request to https://www.instagram.com/p/XXXXXX/ will not contain the required data
It seems like instagram now loads "PostPage" contents dynamically so a simple request to https://www.instagram.com/p/XXXXXX/ will not contain the required data
yeah do you think that there is any way to work around that
I'm also getting those with the comment scraping function, have been for a little over a week
info = looter.get_post_info(media['shortcode']) File "/Library/Python/3.8/site-packages/instalooter/looters.py", line 355, in get_post_info return data['graphql']['shortcode_media'] KeyError: 'graphql'
This is correct. If you comment out the offending line (looters.py line 355) and print data
, you can see that the data structure returned from instagram has changed (no more 'graphql' or 'shortcode_media'). This sloppy hack (below) prints the new data structure and got it kinda unstuck by mapping the new 'media_type' to the old '__typename', but it failed elsewhere later on.
#return data['graphql']['shortcode_media']
print(data)
result = dict();
result['shortcode'] = data['items'][0]['code']
result['id'] = data['items'][0]['pk']
result['__typename'] = "GraphSidecar"
if data['items'][0]['media_type'] == 1:
result['__typename'] = "GraphImage"
if data['items'][0]['media_type'] == 2:
result['__typename'] = "GraphVideo"
return result
It seems this application needs to be significantly re-written to be adapted to the new Instagram API, and it was not written in a modular way that abstracted the API to make it easily swappable.
It seems to be working again... But only temporarily - after a while the lazyloading kicked in again
Hey Anyone what the go through of the issue I am facing the issues
same issue. Implementing the work around from @zambettl results in:
KeyError: 'edge_sidecar_to_children'
debian 9 python 3.5 same issue
I can't say for sure why this error is coming but it seems like it accounts problem. I am trying to run the following script from python 3.10.0
Then the Error Rised