JSONDecodeError
Karlos237 opened this issue · comments
i am not quite sure, what this error is meant to be. The JSON file
https://www.instagram.com/eminem/?__a=1
looks ok.
Is it probably a incompability of libs? I tried to reinstall several times and set up the exact enviromment, but know i am quite unsure if thats the missing link ... Any suggestions? @brunneis
Last line, HTTP 429 is the statuscode for Too many requests
its mean Istagram is blocking you.
all the other error is probably because you get no content.
it can help if you send a "user agent" or you are login (tipp: setup a dev insta-account)
User Agent
WIN Folder: C:\Users\YOU\AppData\Local\Programs\Python\PythonXX\Lib\site-packages\pygram
here in "help.py" line 9
def get_json_from_url(url, method, data=None, headers={'User-agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'}):
and "pygram.py" line 129
headers = {'cookie': 'ig_cb=1','User-agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'}
if you want use your one user-agent google show it up =)
Important this is a quick and dirty solution. More elegant is it if you grab a random user-agent from a list. ;)