Closed pama1999 closed 8 months ago
tried to maybe fix it with a sleep delay but doesnt seem to work as well:
def get_user_info(self, username): try: return self.host.profile(username) except requests.exceptions.TooManyRedirects: sleep(10) return self.host.profile(username)
compelete traceback:
Traceback (most recent call last): File "f:\3. Fun Projects\InfluSpy\Testing\ensta_test.py", line 34, in get_user_info return self.host.profile(username) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\ensta\SessionHost.py", line 556, in profile return self.guest.profile(username, session=self.request_session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\ensta\Guest.py", line 103, in profile http_response: requests.Response = session.get( ^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\requests\sessions.py", line 602, in get return self.request("GET", url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\requests\sessions.py", line 725, in send history = [resp for resp in gen] ^^^^^^^^^^^^^^^^^^^^^^ File "f:\3. Fun Projects\InfluSpy\venv\Lib\site-packages\requests\sessions.py", line 191, in resolve_redirects raise TooManyRedirects( requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Parham\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 198, in _run_module_as_main
return _run_code(code, main_globals, None,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Parham\AppData\Local\Programs\Python\Python312\Lib\runpy.py", line 88, in _run_code
exec(code, run_globals)
File "c:\Users\Parham.vscode\extensions\ms-python.python-2023.22.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher/../..\debugpy__main.py", line 39, in
are you comfortable sharing the entire code? also, please attach full screenshot of the error message as it's not very clear from the text.
are you able to fetch 10 or a few users every time you run the script? or it just no longer works?
do you have another commuincation channel? like Discord? if so kindly add me on discord for the source: @pama021
i've sent you a request. i'm on discord as @notdiezo
seems like this error is realted to the accs getting locked or flagged
This happens sometimes while looping through the followings of a user and the gathering the info of that user, in the gathering process after scraping around 10 I seem to get this error: