Bot that tries to identify political bots that spread fake news and other related things
See Twitter Account Here! 🤖 @BotRobotico
-
Verify if exists political terms on Trending Page.
-
If so, the bot starts checking the latest tweets.
-
For each tweet, the bot will check the user stats.
-
If the user has these conditions:
- The last 20 tweets are only retweets
- The account has an average of 200+ tweets per day, during its existence.
-
If both conditions are true, then the bot will tweet an alert. Saying that account is possibly a bot.
# English 🇺🇸
"🚨 Alert! Possible BOT 🚨"
f"User @{username}"
f"Average {avg_tweets} Tweets/day during his {days} active account days."
f"Total account tweets: {user.tweets}"
f"Term parsed: {term}"
Go to twitter 💀 Souza43419194
Go to twitter 💀 LuizSilveiraSil
- Email/Phone Verified Twitter Account
- A Twitter Developer Account (which is the same twitter account)
Setting up a virtual environment (strongly recommended)
In your terminal, go to the project folder (bothunter
) and run the following commands:
Linux
python -m pip install --user virtualenv
python -m venv .venv
source .venv/bin/activate
Windows
python -m pip install --user virtualenv
python -m venv venv
.\venv\Scripts\activate.bat
pip install -r requirements.txt
Go to Developer Portal Dashboard
- Create an App/Project
- In App Permissions set it to
Read and Write
- In Keys and Tokens generate
Consumer Keys
- Create a
credentials.py
file in the project's root folder (or copycredentials_example.py
then rename it)
bothunter/
├── bot_actions.py
├── bothunter.py
├── bot_identifier.py
├── credentials_example.py
├── credentials.py
...
Copy and paste the consumer keys into credentials.py
# credentials.py
BEARER_TOKEN = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
ACCESS_TOKEN = ""
ACCESS_TOKEN_SECRET = ""
Run the command python bothunter.py
Now your bot is working 🤖
(.venv) ~/pj/bothunter: python bothunter.py
########################################
Buscando Hashtags que contém um dos seguintes termos
['bolsonaro',
'jairbolsonaro',
'presidente',
'doria',
'lula',
'moro',
'Maia',
'FlavioBolsonaro',
'EduardoBolsonaro',
'STF',
'salles',
'lira',
'cpi']
Nenhuma Hashtag encontrada, ficarei procurando a cada 30 segundos
Nenhuma Hashtag encontrada, ficarei procurando a cada 30 segundos