d60 / twikit

Twitter API Scraper | Without an API key | Twitter Internal API | Free | Twitter scraper | Twitter Bot
https://twikit.readthedocs.io/en/latest/twikit.html
MIT License
1.39k stars 162 forks source link

flow name LoginFlow is currently not accessible"}]}" #198

Closed DemianOportus closed 1 month ago

DemianOportus commented 2 months ago

I am using the most basic example and it isn't working. Any solutions?

`import asyncio

from twikit import Client

Enter your account information

USERNAME = XXXX EMAIL = XXXX PASSWORD = XXXX

client = Client('en-US')

async def main():

Asynchronous client methods are coroutines and

## must be called using `await`.
await client.login(
    auth_info_1=USERNAME,
    auth_info_2=EMAIL,
    password=PASSWORD
)

asyncio.run(main())`

Same error,

statsgetter/main.py", line 23, in asyncio.run(main()) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/chris/Desktop/statsgetter/main.py", line 17, in main await client.login( File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 400, in login await flow.execute_task({ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/utils.py", line 88, in executetask response, = await self._client.v11.onboarding_task( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/v11.py", line 85, in onboarding_task return await self.base.post( ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 190, in post return await self.request('POST', url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/twikit/client/client.py", line 164, in request raise BadRequest(message, headers=response.headers) twikit.errors.BadRequest: status: 400, message: "{"errors":[{"code":366,"message":"flow name LoginFlow is currently not accessible"}]}"

ayanavasarkar commented 2 months ago

Getting the same error.

DemianOportus commented 2 months ago

Getting the same error.

Here is my solution:

d60 commented 1 month ago

Duplicate of #169