You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
User is not found, even the user exists
To Reproduce
Steps to reproduce the behavior:
ps: useruser ist just a dummy name
L = instaloader.Instaloader(download_videos=False, download_geotags=False, compress_json=False, save_metadata=False,
dirname_pattern="media/images", download_video_thumbnails=False)
posts = instaloader.Profile.from_username(L.context, "useruser").get_posts()
for post in posts:
caption = post.caption
mentioned_user = post.caption_mentions
hashtags = post.caption_hashtags
filename = L.download_post(post, "media")
Expected behavior
Downloading the images from the given user Error messages and tracebacks
If applicable, add error messages and tracebacks to help explain your problem.
JSON Query to api/v1/users/web_profile_info/?username=useruser : 404 Not Found [retrying; skip with ^C]
JSON Query to api/v1/users/web_profile_info/?username=useruser : 404 Not Found [retrying; skip with ^C]
JSON Query to web/search/topsearch/: HTTP error code 401. [retrying; skip with ^C]
JSON Query to web/search/topsearch/: HTTP error code 401. [retrying; skip with ^C]
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 409, in get_json
raise QueryReturnedNotFoundException("404 Not Found")
instaloader.exceptions.QueryReturnedNotFoundException: 404 Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 409, in get_json
raise QueryReturnedNotFoundException("404 Not Found")
instaloader.exceptions.QueryReturnedNotFoundException: 404 Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 409, in get_json
raise QueryReturnedNotFoundException("404 Not Found")
instaloader.exceptions.QueryReturnedNotFoundException: 404 Not Found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\structures.py", line 946, in _obtain_metadata
metadata = self._context.get_iphone_json(f'api/v1/users/web_profile_info/?username={self.username}',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 571, in get_iphone_json
response = self.get_json(path, params, 'i.instagram.com', tempsession, response_headers=response_headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 439, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 439, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 427, in get_json
raise QueryReturnedNotFoundException(error_string) from err
instaloader.exceptions.QueryReturnedNotFoundException: JSON Query to api/v1/users/web_profile_info/?username=useruser : 404 Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 413, in get_json
raise ConnectionException("HTTP error code {}.".format(resp.status_code))
instaloader.exceptions.ConnectionException: HTTP error code 401.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 413, in get_json
raise ConnectionException("HTTP error code {}.".format(resp.status_code))
instaloader.exceptions.ConnectionException: HTTP error code 401.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 413, in get_json
raise ConnectionException("HTTP error code {}.".format(resp.status_code))
instaloader.exceptions.ConnectionException: HTTP error code 401.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pathxyz....poster.py", line 37, in <module>
grab_images_from_all_users(15)
File "pathxyz....modules\image_grabber.py", line 9, in grab_images_from_all_users
posts = instaloader.Profile.from_username(L.context, "useruser ").get_posts()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\structures.py", line 877, in from_username
profile._obtain_metadata() # to raise ProfileNotExistsException now in case username is invalid
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\structures.py", line 953, in _obtain_metadata
top_search_results = TopSearchResults(self._context, self.username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\structures.py", line 1984, in __init__
self._node = context.get_json('web/search/topsearch/',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 439, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 439, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pathzyx....Local\Programs\Python\Python312\Lib\site-packages\instaloader\instaloadercontext.py", line 429, in get_json
raise ConnectionException(error_string) from err
instaloader.exceptions.ConnectionException: JSON Query to web/search/topsearch/: HTTP error code 401.
Process finished with exit code 1`
Instaloader version
4.11
The text was updated successfully, but these errors were encountered:
I think there is no problem here since using the typical instaloader profile "useruser" retrieves the image on the account without any problem. There is nothing to be done on the side of instaloader since it is working.
Maybe there's a problem with that specific username or that they have deactivate that's why there's nothing to be downloaded anymore.
If you can, just add a code that will skip the usernames that can't be found anymore.
If downloading images from a profile using instaloader profile _username_ works, there's nothing to be done.
Describe the bug
User is not found, even the user exists
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Downloading the images from the given user
Error messages and tracebacks
If applicable, add error messages and tracebacks to help explain your problem.
Process finished with exit code 1`
Instaloader version
4.11
The text was updated successfully, but these errors were encountered: