Skip to content
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

Sometimes get the error: twikit.errors.TwitterException #339

Open
brandon840 opened this issue Mar 26, 2025 · 0 comments
Open

Sometimes get the error: twikit.errors.TwitterException #339

brandon840 opened this issue Mar 26, 2025 · 0 comments

Comments

@brandon840
Copy link

brandon840 commented Mar 26, 2025

Most of the time, after I try to login, I get the following error:

"""
twikit.errors.TwitterException: Nous avons bloqué une tentative d'accès à votre compte car nous n'étions pas sûrs qu'il s'agissait bien de vous.

Cela se produit quand nous constatons une activité de connexion inhabituelle, comme des tentatives de connexion trop nombreuses, ou depuis un lieu ou un appareil différent.

Vous devrez attendre avant d'essayer de vous reconnecter. Certains blocages sont supprimés automatiquement.
"""

Code:

import asyncio
import time
from twikit import Client

usernames = [...]
emails = [...]
passwords = [...]

clients = []
for _ in range(NUM_ACCOUNTS):
 clients.append(Client('en-US'))

async def scrape_tweets():
    for i, client in enumerate(clients):
        await client.login(
            auth_info_1=usernames[i],
            auth_info_2=emails[i],
            password=passwords[i]
        )
        time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant