DEV Community

Cover image for Making a Twitter bot with Python

Making a Twitter bot with Python

Seema Saharan on July 11, 2020

Do you use Twitter? If so, then you must come across some of the bots that like, retweet, follow, or even reply to your tweets. But have you ever w...
Collapse
 
nav_devl profile image
Naveen Honest Raj

Hello Seema, loved your explanation 🔥
I hope you are also aware of using Stream instead of Cursor in your approach to get the tweets containing the particular hashtag. It would be very helpful for beginner level readers to understand the differences and apply them accordingly. But this is cool. Your line-by-line explanation is 👌🏻👌🏻

Collapse
 
seemasaharan profile image
Seema Saharan

Thank you so much.

Collapse
 
miketheyeti profile image
MikeTheYeti

This has gotten my bot project further than anything else I have done to date. I am a dilettante in Python and am making a twitter bot to practice.

I am stuck on how to reply to a tweet with one of a set of messages (I think I got random.choice to work). My scheme is to reply to tweets based off keywords.

Thanks so much for this work. I love watching my code actually work!!!

Collapse
 
seemasaharan profile image
Seema Saharan

I'm glad it helped.

Collapse
 
runtimeerror20 profile image
{Amogh Dixit}

Thanks a lot! I was looking for something like this for a long time. I really wanna try it out 😃

Collapse
 
seemasaharan profile image
Seema Saharan

Welcome.😀

Collapse
 
thevediwho profile image
Vaibhav Dwivedi

Very interesting. I was looking for something like this.

Collapse
 
seemasaharan profile image
Seema Saharan

I hope this will be helpful for you.

Collapse
 
santosh profile image
Santosh Kumar • Edited

Make one post on OAuth2 authentication from scratch.

By scratch I mean with just using requests library.

Collapse
 
seemasaharan profile image
Seema Saharan

Sure.

Collapse
 
blancoharsh profile image
Harsh #34

Hello,
first of all great explanation but i was wondering if there is any way to ,make a bot to retweet specific user's tweets?
thanks