Instagram bearer or cookies generator
- Python 3.8+
- Install requirements
$ pip install -r requirements.txt
- Copy
config.py.example
toconfig.py
$ cp config.py.example config.py
from instagram import InstagramLogin
username = 'xxxxxxx'
password = 'xxxxxxx'
ig = InstagramLogin()
response, bearer = ig.generate_bearer(username, password)
if "logged_in_user" in response:
print(bearer)
else:
print("Error login `{}` with error: `{}`".format(username, response['message']))
from instagram import InstagramLogin
username = 'xxxxxxx'
password = 'xxxxxxx'
ig = InstagramLogin()
response, cookies = ig.generate_cookie(username, password)
if "logged_in_user" in response:
print(cookies)
else:
print("Error login `{}` with error: `{}`".format(username, response['message']))