alenkimov / tweepy-self

Twitter (selfbot) for Python!
93 stars 23 forks source link

What am I doing wrong? twitter.errors.NotFound: (response status: 404) (code 34) Sorry, that page does not exist #9

Open hhhscvx opened 4 days ago

hhhscvx commented 4 days ago

The account is working, I logged in to it using the token, but it doesn't work through the code

proxy = "http://my_user:my_pass@my_host:my_port"

async def main():
    twitter_account = twitter.Account(
        auth_token="my_token",
    )

    async with twitter.Client(twitter_account, proxy=proxy) as twitter_client:
        logger.success(f"Logged in as @{twitter_account.username} (id={twitter_account.id})")

if __name__ == "__main__":
    logger.enable('twitter')
    asyncio.run(main())

Error:

2024-11-29 10:12:56 | DEBUG    | 139 - (auth_token=741**44d, id=None, username=None) ==> Request POST https://x.com/i/api/1.1/account/settings.json
2024-11-29 10:12:57 | DEBUG    | 155 - (auth_token=741**44d, id=None, username=None) <== Response POST https://x.com/i/api/1.1/account/settings.json
Status code: 404
Response data: {"errors":[{"message":"Sorry, that page does not exist","code":34}]}
Traceback (most recent call last):
  File "/home/kirill/PycharmProjects/TwitterPractice/demo_twitter.py", line 26, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/kirill/PycharmProjects/TwitterPractice/demo_twitter.py", line 19, in main
    async with twitter.Client(twitter_account) as twitter_client:
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 101, in __aenter__
    await self.on_startup()
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 316, in on_startup
    await self.update_account_info()
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 540, in update_account_info
    await self._update_account_username()
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 444, in _update_account_username
    response, response_json = await self.request("POST", url)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 280, in request
    return await self._request(method, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kirill/PycharmProjects/TwitterPractice/venv/lib/python3.11/site-packages/twitter/client.py", line 241, in _request
    raise NotFound(response, data)
twitter.errors.NotFound: (response status: 404)
(code 34) Sorry, that page does not exist
alenkimov commented 1 day ago

I don't support this library now