Instaloader: Login does not function

Created on 25 Jul 2018  路  3Comments  路  Source: instaloader/instaloader

When i use the following command:

instaloader --login=MYUSERNAME TARGETUSERNAME --no-captions --no-metadata-json --stories

I get the following response after entering my password:

Traceback (most recent call last):
File "c:python361libsite-packagesurllib3connectionpool.py", line 601, in urlopen
chunked=chunked)
File "c:python361libsite-packagesurllib3connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "c:python361libsite-packagesurllib3connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "c:python361libhttpclient.py", line 1331, in getresponse
response.begin()
File "c:python361libhttpclient.py", line 321, in begin
self.headers = self.msg = parse_headers(self.fp)
File "c:python361libhttpclient.py", line 211, in parse_headers
raise HTTPException("got more than %d headers" % _MAXHEADERS)
http.client.HTTPException: got more than 100 headers

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:python361libsite-packagesrequestsadapters.py", line 440, in send
timeout=timeout
File "c:python361libsite-packagesurllib3connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "c:python361libsite-packagesurllib3utilretry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "c:python361libsite-packagesurllib3packagessix.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:python361libsite-packagesurllib3connectionpool.py", line 601, in urlopen
chunked=chunked)
File "c:python361libsite-packagesurllib3connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "c:python361libsite-packagesurllib3connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "c:python361libhttpclient.py", line 1331, in getresponse
response.begin()
File "c:python361libhttpclient.py", line 321, in begin
self.headers = self.msg = parse_headers(self.fp)
File "c:python361libhttpclient.py", line 211, in parse_headers
raise HTTPException("got more than %d headers" % _MAXHEADERS)
urllib3.exceptions.ProtocolError: ('Connection aborted.', HTTPException('got more than 100 headers',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:Python361Scriptsinstaloader-script.py", line 11, in
load_entry_point('instaloader==4.0.5', 'console_scripts', 'instaloader')()
File "c:python361libsite-packagesinstaloader__main__.py", line 334, in main
storyitem_filter_str=args.storyitem_filter)
File "c:python361libsite-packagesinstaloader__main__.py", line 89, in _main
instaloader.interactive_login(username)
File "c:python361libsite-packagesinstaloaderinstaloader.py", line 749, in interactive_login
self.login(username, password)
File "c:python361libsite-packagesinstaloaderinstaloader.py", line 329, in login
self.context.login(user, passwd)
File "c:python361libsite-packagesinstaloaderinstaloadercontext.py", line 187, in login
data={'password': passwd, 'username': user}, allow_redirects=True)
File "c:python361libsite-packagesrequestssessions.py", line 555, in post
return self.request('POST', url, data=data, json=json, *kwargs)
File "c:python361libsite-packagesrequestssessions.py", line 508, in request
resp = self.send(prep, *
send_kwargs)
File "c:python361libsite-packagesrequestssessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "c:python361libsite-packagesrequestsadapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', HTTPException('got more than 100 headers',))

bug

Most helpful comment

Found a quick solution with some googling by adding the following lines into instaloader.py:
import http.client
http.client._MAXHEADERS = 1000

All 3 comments

Found a quick solution with some googling by adding the following lines into instaloader.py:
import http.client
http.client._MAXHEADERS = 1000

Having the same problem with Windows standalone version..

same here getting the same error using windows 10 standalone version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Coriou picture Coriou  路  3Comments

rourpab picture rourpab  路  3Comments

luthfirrahmanb picture luthfirrahmanb  路  3Comments

remlap picture remlap  路  3Comments

WaseemRakab picture WaseemRakab  路  3Comments