Skip to content
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

JSONDecodeError #6

Open
Karlos237 opened this issue Dec 29, 2020 · 2 comments
Open

JSONDecodeError #6

Karlos237 opened this issue Dec 29, 2020 · 2 comments

Comments

@Karlos237
Copy link

Karlos237 commented Dec 29, 2020

Clipboard01

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

@nicoausnrw
Copy link

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. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@nicoausnrw @Karlos237 and others