A Python script for Re-tweeting tweets
On the attempt to always learn something new, I was playing around with Python, the Python-Twitter Package and the Schedule package.
Pretty much I wanted to create a small script where I could every X minutes to connect on twitter and re-tweet some tweets that were using an specific hashtag.
This was what I came up with.
https://github.com/marcosfreccia/python-scripts/blob/master/python_twitter_retweet_client.py
What do you need to get it running?
1) You will need a twitter account. In the script I just use my marcosfreccia twitter. The reason for that, well, it is off course to generate the keys and everything.
2) I am using Python 3.6. So, if you don’t have Python in your environment you can download this one.
3) You will need to install the python-twitter package. In this hyperlink you will find all the instructions for installing and creating the Twitter Tokens and Keys.
4) You will need to install the Schedule Python Package
Doing those four steps you will be able to have your own “twitter bot”. The script itself is still a bit rudimentary and needs some adjustments and improvements, but it is working!
Marcos Freccia
Data Platform MVP
Posted on April 9, 2018, in VirtualPass and tagged Python, python script for twitter, python twitter client, re-tweet tweets python, twitter bot. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0