b3nab / instapy-cli

:sparkles: Python library and CLI to upload photo and video on Instagram. W/o a phone!
MIT License
601 stars 98 forks source link

[BUG] I CAN NOT LOG IN TO INSTAGRAM ACCOUNT TO USE CODE. NOT COOKIE FILE FOUND. #95

Open MindaugasVaitkus2 opened 4 years ago

MindaugasVaitkus2 commented 4 years ago

Describe the bug I can nont log to instagram account to use code. Not found cookie/cookie_file found.

To Reproduce Code to reproduce the behavior: [IG] not found cookie/cookie_file >> login as default ClientError checkpoint_challenge_required (Code: 400, Response: {"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/6033869826/KIJQve2H7q/", "api_path": "/challenge/6033869826/KIJQve2H7q/", "hide_webview_header": true, "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"})

Process finished with exit code 9


#code here
from instapy_cli import client

username = "anyname"
password = "anypassword"
cookie_file = 'ANYNAME_ig.json' 

with client(username, password, cookie_file=cookie_file, write_cookie_file=True) as cli:
    # get string cookies
    cookies = cli.get_cookie()
    print(type(cookies)) # == str
    print(cookies)
    # do stuffs with cli
    ig = cli.api()
    me = ig.current_user()
    print(me)
duplicate-issues[bot] commented 4 years ago

Hey @MindaugasVaitkus2,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot