How to Create a Twitter Bot [Tweepy with Python]
Vložit
- čas přidán 5. 07. 2024
- How to Create a Twitter Bot [Python]
- a video by CreepyD
In today's Tweepy tutorial, I'll be showing you how to make a Twitter Bot with Python (using Tweepy, which is a Python library for accessing the Twitter API to create Twitter bots). We'll be doing a Tweepy setup, then a basic Tweepy tutorial, and then we'll be creating 3 different bots - a Twitter bot to like tweets, a Twitter bot that replies, and I'll also be showing you how to create a Twitter bot that retweets. If you find this Twitter Bot tutorial helpful, be sure to subscribe to the channel and like the video, thank you :)
TIME-STAMPS:
00:00 Introduction
00:44 Tweepy Setup
05:04 Tweepy Basics
08:01 Twitter Retweet Bot
17:25 Twitter Reply Bot
20:49 Twitter Like Bot
Support me on Patreon - / creepyd
____________
GITHUB LINKS:
Reply Bot GitHub - github.com/CreepyD246/Twitter...
Like Bot GitHub - github.com/CreepyD246/Twitter...
Retweet Bot GitHub - github.com/CreepyD246/Twitter...
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
____________
USEFUL LINKS & DOCUMENTATIONS:
Twitter Developer Platform - / en
Tweepy Documentation - docs.tweepy.org/en/stable/
Tweepy PyPI - pypi.org/project/tweepy/
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
____________
OTHER TUTORIALS:
Twitter Bot Tutorial in Python [Selenium] - • How to Create a Twitte...
Tweepy Setup Tutorial - • How to Set Up Tweepy [...
Tweepy Beginner Tutorial - • Beginner Tweepy Tutori...
Twitter Reply Bot Tutorial - • How to Create a Twitte...
Tweepy Like Bot - • How to Create a Twitte...
Tweepy Retweet Bot - • How to Create a Twitte...
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅
____________
OTHER MEDIA:
Instagram - / creepyd_studios
Twitter - / creepyd_studios
Discord - / discord
̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ ̅ - Jak na to + styl
Hi everyone. This Tweepy tutorial was made before Tweepy got an update, so to minimize errors in your programs, make sure to use the same version of Tweepy that I used in the video, (I used Tweepy version 3.10.0). If you want to use the newer version of Tweepy, I'll try to create another Tweepy tutorial using the updated version, but for now, you might need to use another tutorial, unfortunately. Sorry for the inconvenience
Happy birthday Creepyd. Love your work. Keep it up!
Thank you for the tutorial :)
Nice continuation man
love the videos fam
Thank you! I wasn't figuring out how to setup my app and most tutorials just skip this part.
The setup process and a bit of the code changed, so if you want you can watch the updated tutorial series of Tweepy on my channel
helpful
How do I get approved to make the bot? I don't see apply
my twitter bot doesnt replies when i mention it in other tweet replie.
can you help me?
How are you bypassing the bearer token authentication. Every time I am trying to fetch the data from the api or do anything with it. It gives me the error saying.... Code: 32, message : "Couldn't authenticate you."
btw nyc context mate!!
Just have learnt this thing from your video, tried to implement, but currently i am stuck at this authentication point.
Hey! cool content mate, could you please make a bot that keep posting certain tweets on loop?
You just need a while True loop that posts a tweet, and then use the time module to set a delay of a certain amount of seconds
Hello bro please guide me about this :
I have a script for python selenium that made for autocomment on instagram but i want to develope it to make an engagement right away whenever someone im following publish anything there
?
(Not just make a random comment for old posts but for the most new one to be rank first )
Is it possible to make a twitter bot that replies with a random video from a youtube playlist when mencioned?
Great tutorial btw!!
Yes, it's possible, and thanks :D
If you want to make such a bot, you'd need to get the links of the videos in the playlist, which you could probably do using web-scraping. After that, you'd also need to store them in a list, and then use Python's 'random' module to select 1 video link. After that, you could loop the Twitter Bot to keep looking for replies to tweets, and then when there is one, reply to it. I'm not able to help much on CZcams comments, so if you have further questions, feel free to check out my Discord in the description
There is a way to check if an page was updated and then post the newest content? like a new post in a blog? Thanks!
I just want to make sure I understand correctly, do you want to get the latest information on a website, and then tweet that information? Or do you want to find new tweets, and then retweet/tweet those tweets on your account? Or do you want to know if someone's profile changed and then tweet it?
@@CreepyD246 yeah i want tô share the link of the post :)
i'm having some kind of issue, "tweppy could not be resolved" yet i installed it, uninstalled it and installed it again ! :(
Chúc anh luôn sức khỏe và hát cho chúng em nghe nhé
auth.set_access_token is a syntax error after .set_access_token why is that?
Make sure everything is spelled and typed correctly, and if the error persists then try using Tweepy version 3.10.0, and if the error still doesn't go away try to use the exact code in the video. Hope this helps
there is no apply in dev website
hey so, Tweepy isn't installing for somereason. It says that It can't find "pip" or something. (I'm using Windows 11)
You need to install pip manually. Or you could watch my video on downloading and setting up Python. Hope this helps
@@CreepyD246 alrighty. Thanks for telling me!
Hello Creepy thanks a lot for your vidéo ! Can we make a bot to mass follow peoples on twitter?
Help me am not success
The Title should be "How to Create a Twitter Bot from a Twitter Bot"...
FFS twitter changes these settings so quick! Half the stuff you shown I can no longer find.
Sorry about the struggles. Try using Tweepy version 3.10.0, that's the version that was used in the video. The documwntation to that version should still be available somewhere
please send your code
It's in the description
Bro
What
Happened
To
I*n*s*t*a
Account?
I don’t understand it’s setup 🤦🏾♂️ you’re just rushing everything like you’re a real bot, allow us catch up please
you can pause youtube videos and go back....
watch on 0.75 and maybe even 0.5 speed and thank me later
I'll keep that in mind in future videos, thank you
@@CreepyD246 No it's good, I am a beginner and I love what you do. For the setup it's a little bit complicated, you need to apply to elevated access on twitter DEV and allow the write usages in 0auth 1.0 to use Tweepy ! :)
L
The Tutorial is too fast. I don’t like it.
Will keep in mind
@@CreepyD246 I think you should redo the tutorial. I eagerly want to know how to make a twitter bot. As you make a tutorial know that complete beginners are watching. So don’t assume that everyone knows what you are doing. It’s good to elaborate some steps done. Thank you.
@@stephenombaso8078 I elaborated on most things that are important, unless I have explained it earlier or later in the video. I was also planning on recreating the tutorial in the future because Tweepy has updated their library. Also, the video wasn't intended for complete beginners, otherwise I'd have to explain the whole concept of variables and the Python programming language, these videos also take about 1 week to make so please don't ask me to recreate something just because I spoke too fast - I said I'd keep it in mind for future videos.
bot_id = int(api.me().id_str)
AttributeError: 'API' object has no attribute 'me'
Can you help me ?
Some people have gotten this same error, I think it's because I was using Tweepy version 3.10.0 and other were using the latest Tweepy. Try uninstalling Tweepy, and then re-installing it as version 3.10.0
Hi Creepy ! Love what you do ! I have an error on 12:23 minute on your tutorial :
Traceback (most recent call last):
File "testbot.py", line 36, in
bot_id = int(api.me().id_str)
AttributeError: 'API' object has no attribute 'me'
---------------------------------------------------------------------------------------
So I change this line with this code :
bot_id = int()
And it's work fine. What is the difference ? Thank you ! Have a nice day !
Hi, sorry for responding so late, your comment got held back by CZcams for some reason. In regard to your question, the error you got is because in the tutorial I used Tweepy version 3.10.0, but Tweepy updated it since and now there's an error on that line of code. The difference is that the line of code you used doesn't store the bot's id, but an empty integer. If you want to take the error away then in command prompt type the following:
pip uninstall tweepy
then type this:
pip install tweepy==3.10.0
Hi brother, first of all, thanks for the amazing tutorial.. Now, I was creating a bot that replies when someone mention us, however with your code it is also posting the "message" as a tweet from the bot account and this code is not working when someone mention us in a comment on someone else's tweet. Can you help me please.. I can share the code and screenshots for the same if you can provide me your email id. Thanks again.