Some useful Twitter bots in Python
You need to install the module tweepy in order to use the scripts.
pip3 install --user tweepy
This file is where you will put your credentials from your Twitter Developers Account.
For your security never put your token keys explicitly on remote servers.
auth = tweepy.OAuthHandler(consumer_key='', consumer_secret='') auth.set_access_token(key='', secret='')
The goal of this script is to retweet tweets based on the filter from the given parameters of the function: scrape.
d = datetime.today() - timedelta(days=14) scrape(words='(vaga OR vagas) (pj OR clt) (dev OR desenvolvedor OR UI OR UX OR DevOps OR SRE) R$ -filter:retweets', date_since=d ,numtweet=300, language='pt')
The parameters above fetches the job opportunities with the keywords as you can see on the snippet above that are not retweets from two weeks ago.
This script is just a simple example on how to autolike tweets where your account was mentioned every 15 seconds.