-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Can't seem to fetch followers and followees #2473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Facing the same issue |
Same issue, seems like instaloader is blocked. |
1 similar comment
Same issue, seems like instaloader is blocked. |
Yup, it is happening on all my accounts now. |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
Same problem fix it duh |
Same from the begining |
same problem.... |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
Still a problem, you can't close it until it is solved 😭 |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
Solve the issue |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
Solve the issue |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
hi all, hope you are doing well. I am trying to fetch followers and followings but i directly get an error, i had installed latest instaloader with pip3 install instaloader, browsed through the issues posted here and saw version 4.13.2 does fix the problem, but it apparently does not. i haven't gotten any popups within this instagram account related to account issues. Please help, how to fix?
import instaloader
L = instaloader.Instaloader()
Log in to Instagram
username = "x"
password = "x"
L.login(username, password)
profile = instaloader.Profile.from_username(L.context, username)
followers = set([follower.username for follower in profile.get_followers()])
following = set([followee.username for followee in profile.get_followees()])
with open("followers.txt", "w") as f:
f.write("\n".join(followers))
Error:
python followers.py
JSON Query to graphql/query: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D [retrying; skip with ^C]
JSON Query to graphql/query: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D [retrying; skip with ^C]
Traceback (most recent call last):
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 456, in get_json
raise ConnectionException(self._response_error(resp))
instaloader.exceptions.ConnectionException: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 456, in get_json
raise ConnectionException(self._response_error(resp))
instaloader.exceptions.ConnectionException: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 456, in get_json
raise ConnectionException(self._response_error(resp))
instaloader.exceptions.ConnectionException: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/santiagoberistain/followers.py", line 15, in
followers = set([follower.username for follower in profile.get_followers()])
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/structures.py", line 1301, in get_followers
return NodeIterator(
^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/nodeiterator.py", line 100, in init
self._data = self._query()
^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/nodeiterator.py", line 109, in _query
return self._query_query_hash(self._query_hash, after)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/nodeiterator.py", line 131, in _query_query_hash
self._context.graphql_query(
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 511, in graphql_query
resp_json = self.get_json('graphql/query',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 480, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 480, in get_json
return self.get_json(path=path, params=params, host=host, session=sess, _attempt=_attempt + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/santiagoberistain/.pyenv/versions/3.11.7/lib/python3.11/site-packages/instaloader/instaloadercontext.py", line 468, in get_json
raise ConnectionException(error_string) from err
instaloader.exceptions.ConnectionException: JSON Query to graphql/query: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?query_hash=37479f2b8209594dde7facb0d904896a&variables=%7B%22id%22%3A%2239804319258%22%2C%22first%22%3A12%7D
with open("following.txt", "w") as f:
f.write("\n".join(following))
print("Saved lists: 'followers.txt' and 'following.txt'")
The text was updated successfully, but these errors were encountered: