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

Issue with logging in #200

Open
raghdaa-ahmed opened this issue Jun 10, 2024 · 1 comment
Open

Issue with logging in #200

raghdaa-ahmed opened this issue Jun 10, 2024 · 1 comment

Comments

@raghdaa-ahmed
Copy link

raghdaa-ahmed commented Jun 10, 2024

I have been using snscrape until last year (before it stopped working) and I recently found out about this package so thank you for this, it looks promising.
I am a data analyst with no deep programming knowledge so excuse me if the questions are silly.

I have installed twscrape but I have an issue logging in at this step.

await api.pool.add_account("user1", "pass1", "[email protected]", "mail_pass1")
await api.pool.add_account("user2", "pass2", "[email protected]", "mail_pass2")
await api.pool.login_all()

1- Is it safe to just type my passwords in the code at this step? Because the email I use for my twitter account is an important email for me.

2- Should I use 2 accounts or is using 1 account only ok?

3- I tried logging into one account and I got this. I entered the username and password of an existing account and the email associated with that account and the password of that email. Am I doing this right?

2024-06-10 01:06:41.586 | WARNING | twscrape.accounts_pool:add_account:88 - Account "my_username" already exists 2024-06-10 01:06:41.596 | WARNING | twscrape.accounts_pool:get_for_queue_or_wait:297 - No active accounts. Stopping... 2024-06-10 01:06:41.605 | WARNING | twscrape.accounts_pool:get_for_queue_or_wait:297 - No active accounts. Stopping..

@LucasLeRay
Copy link
Contributor

1- As for any programming project, it's a bad practice to write your emails and passwords in code. A preferred approach is to populate them through environment variables or, even better, using dedicated secrets storages. But more generally for scraping I don't recommend using your personal "important" email. It could be locked by Twitter.

2- Using 1 account is fine, but you'll be limited in the number of operations per 15m you can do. Additionally, Twitter is pretty good at identifying scrapers, so if your single account is caught by Twitter, your program will stop working. It's better to have multiple accounts and replace them when caught.

3- Can you show us the specific piece of code you used?

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

2 participants