Building a twitter bot with python

Adam Giles, 12 April 2020

Courtesy of moving jobs, a lot of annual leave to use up, and covid-19 lockdown I’ve had more time than usual to spend on personal projects.

I’d been meaning to do this one for a while. As far as I can tell there is no way to follow a hashtag on twitter the way you can on instagram. So if you want to keep up to date with content under a particular tag you need to manually search for it each time.

For economics, the most prominent hashtag is #econtwitter. So I built a bot to periodically search for tweets under that hashtag and retweet from those available. By following the bot you should keep up to date with content from accounts you don’t already follow.

If you’d like to follow the account it’s @recontweeter, and if you’d like to look at the code it’s here.


Adam Giles  



© Adam Giles 2023