Fix login by allowing more http headers
Because Instagram is bombarding over hundret of headers on login it is necessary to increase http.client._MAXHEADERS. Fixes #152.
This commit is contained in:
parent
0ebb223214
commit
1739844758
@ -175,6 +175,9 @@ class InstaloaderContext:
|
||||
:raises InvalidArgumentException: If the provided username does not exist.
|
||||
:raises BadCredentialsException: If the provided password is wrong.
|
||||
:raises ConnectionException: If connection to Instagram failed."""
|
||||
import http.client
|
||||
# pylint:disable=protected-access
|
||||
http.client._MAXHEADERS = 200
|
||||
session = requests.Session()
|
||||
session.cookies.update({'sessionid': '', 'mid': '', 'ig_pr': '1',
|
||||
'ig_vw': '1920', 'csrftoken': '',
|
||||
|
Loading…
Reference in New Issue
Block a user