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.


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! Smile

Marcos Freccia
Data Platform MVP

About Marcos Freccia

MVP em SQL Server (Data Plataform) , especialista em SQL Server, e atualmente trabalhando com Microsoft Azure!

Posted on April 9, 2018, in VirtualPass and tagged , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: