A twitter bot with python using the selenium library and GeckoDriver.
Using a keyword, the bot uses it to perform a search on Twitter and interacts with the results(tweets). For the moment, it likes and retweets these tweets.
Based on Dev Ed's video tutorial.
(the tutorial code is not entirely functional any more, because of Twitter's changes in their DOM tree)
- geckodriver
Extract executable in C://Users//{username}//AppData//Local//Programs//Python//Python{version} - Use the package manager pip to install Selenium.
pip install selenium
- if a tweet is already liked, an exception is thrown and a message is printed, but it does not break
- ATTENTION: if Twitter detects suspicious activity after many login attempts, login fails but no exception is thrown, the bot tries (unsuccessfully) to like/retweet without an account
again, if a tweet is already liked, the bot might like a comment insteadeven if the sign in is unsuccessful, the program still searches the given word and tries to like tweets
- like
- retweet
- comment
- follow
- ChromeDriver