alvwin / ai_phishing_toolkit

0 stars 1 forks source link

Twitter Critical error #3

Open manudev-1 opened 1 month ago

manudev-1 commented 1 month ago

Twitter fatal error

Fatal error trying to execute social Twitter

Description

A change in the original API sends 403 Forbidden trying to get the user by the screen name. Other users are facing this issue (Example: #123; #186)

Error

Traceback (most recent call last): File "C:\Users\@#!\Desktop\ai_phishing_toolkit\console_program.py", line 96, in asyncio.run(main()) File "C:\Users\@#!\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\@#!\AppData\Local\Programs\Python\Python312\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\console_program.py", line 52, in main await social.single_user(ai_option) File "C:\Users\@#!\Desktop\ai_phishing_toolkit\SocialService\Social\TwitterService.py", line 53, in single_user tweets, userinfo = await self._get_user(username) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\SocialService\Social\TwitterService.py", line 96, in _get_user user = await client.get_user_by_screen_name(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\env\Lib\site-packages\twikit\client\client.py", line 1334, in get_user_by_screenname response, = await self.gql.user_by_screen_name(screen_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\env\Lib\site-packages\twikit\client\gql.py", line 250, in user_by_screen_name return await self.gql_get(Endpoint.USER_BY_SCREEN_NAME, variables, USER_FEATURES, extra_params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\env\Lib\site-packages\twikit\client\gql.py", line 121, in gql_get return await self.base.get(url, params=flatten_params(params), headers=headers, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\env\Lib\site-packages\twikit\client\client.py", line 186, in get return await self.request('GET', url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\@#!\Desktop\ai_phishing_toolkit\env\Lib\site-packages\twikit\client\client.py", line 168, in request raise Forbidden(message, headers=response.headers) twikit.errors.Forbidden: status: 403, message: ""

Solution

Consider changing the library or waiting for someone to fix twikit error

alvwin commented 1 month ago

Hmm, it was working last week, let's see if the error gets fixed in twikit, otherwise we can look to change the library

manudev-1 commented 1 month ago

Hmm, it was working last week, let's see if the error gets fixed in twikit, otherwise we can look to change the library

Does It still work for you?

alvwin commented 1 month ago

Nope

manudev-1 commented 4 weeks ago

@alvwin I don't know if you made some changes but now it works perfectly

AKSMA commented 3 weeks ago

I am still getting this error. What should i do?

manudev-1 commented 3 weeks ago

I am still getting this error. What should i do?

I honestly don't know, as you can read from previous messages the problem resolved itself

alvwin commented 3 weeks ago

It seems to be an oddity of twikit, sometimes it works, sometimes it doesn't. Maybe looking into a change of library is the way to go here