InstaLooter icon indicating copy to clipboard operation
InstaLooter copied to clipboard

Login error, break on 'csrftoken'

Open yanchao7511461 opened this issue 4 years ago • 4 comments

Traceback (most recent call last): File "/Users/yc/miniconda2/envs/instalooter/lib/python3.8/site-packages/instalooter/cli/init.py", line 151, in main login(args) File "/Users/yc/miniconda2/envs/instalooter/lib/python3.8/site-packages/instalooter/cli/login.py", line 21, in login InstaLooter._login(username, password) File "/Users/yc/miniconda2/envs/instalooter/lib/python3.8/site-packages/instalooter/looters.py", line 151, in _login token = next(c.value for c in login.cookies if c.name == 'csrftoken') StopIteration 2020-05-17 19:48:26 ycdeMacBook-Air.lan instalooter.cli[9680] WARNING unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.123.150', 54188), raddr=('31.13.70.174', 443)>

yanchao7511461 avatar May 17 '20 11:05 yanchao7511461

I dont know how to fix this but all I know it originates from the 400 HTTP response when requesting the login url : https://www.instagram.com/accounts/login/ajax

AdelMadkour avatar May 18 '20 21:05 AdelMadkour

I found a quick fix I have seen in another instagram repo ( a php one):

In file InstaLooter/instalooter/looters.py: change this line : data = {'username': username, 'password': password} to this line: data = {'username': username, 'enc_password': '#PWD_INSTAGRAM_BROWSER:0:' + str(time.time()) + ':' + password}

AdelMadkour avatar May 18 '20 21:05 AdelMadkour

I found a quick fix I have seen in another instagram repo ( a php one):

In file InstaLooter/instalooter/looters.py: change this line : data = {'username': username, 'password': password} to this line: data = {'username': username, 'enc_password': '#PWD_INSTAGRAM_BROWSER:0:' + str(time.time()) + ':' + password}

Solved;thanks

gnu-like avatar May 19 '20 07:05 gnu-like

I found a quick fix I have seen in another instagram repo ( a php one):

In file InstaLooter/instalooter/looters.py: change this line : data = {'username': username, 'password': password} to this line: data = {'username': username, 'enc_password': '#PWD_INSTAGRAM_BROWSER:0:' + str(time.time()) + ':' + password}

thanks, it works .

yanchao7511461 avatar May 20 '20 11:05 yanchao7511461