megadose / toutatis

Toutatis is a tool that allows you to extract information from instagrams accounts such as e-mails, phone numbers and more
GNU General Public License v3.0
1.9k stars 237 forks source link

fix(core): add cookies back to get userId #108

Closed atz-spe closed 2 months ago

atz-spe commented 2 months ago

Issue

The https://i.instagram.com/api/v1/users/web_profile_info/?username= endpoint is authenticated.
Actual version can't get userId when retrieving data as JSON :

Traceback (most recent call last):
  File "/usr/local/bin/toutatis", line 33, in <module>
    sys.exit(load_entry_point('toutatis==1.26', 'console_scripts', 'toutatis')())
  File "/usr/local/lib/python3.10/dist-packages/toutatis-1.26-py3.10.egg/toutatis/core.py", line 83, in main
KeyError: 'user'

Patch

We use the cookie variable to authenticate ourselves on the endpoint and get what we want.