JSON Query to accounts/login/: Could not find "window._sharedData" in html response. [retrying; skip with ^C]

288 views Asked by At

I am using Instaloader library and trying to login by using:

When i do login i use the correct, username and password, but there is no way i could login successfully! Does anybody has faced this issue?

L = instaloader.Instaloader()
L.login("USERNAME", "PASSWORD")

Error:

JSON Query to accounts/login/: Could not find "window._sharedData" in html response. [retrying; skip with ^C]
JSON Query to accounts/login/: Could not find "window._sharedData" in html response. [retrying; skip with ^C]
Traceback (most recent call last):
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 356, in get_json
    raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.")
instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 356, in get_json
    raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.")
instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 356, in get_json
    raise QueryReturnedNotFoundException("Could not find \"window._sharedData\" in html response.")
instaloader.exceptions.QueryReturnedNotFoundException: Could not find "window._sharedData" in html response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloader.py", line 634, in login
    self.context.login(user, passwd)
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 214, in login
    csrf_json = self.get_json('accounts/login/', {}, session=session)
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 394, in get_json
    return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1)
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 394, in get_json
    return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1)
  File "/Users/user/.virtualenvs/insta_scrapper/lib/python3.7/site-packages/instaloader/instaloadercontext.py", line 382, in get_json
    raise QueryReturnedNotFoundException(error_string) from err
instaloader.exceptions.QueryReturnedNotFoundException: JSON Query to accounts/login/: Could not find "window._sharedData" in html response.
0

There are 0 answers