Тёмный

How To Build A Reddit Bot Using Python - Full Beginner Tutorial 

connorcreate
Подписаться 820
Просмотров 4,9 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@connorcreate
@connorcreate 9 месяцев назад
I'll zoom in more on the code next time, I promise.
@riqvip
@riqvip 4 месяца назад
HOLY! It worked, thanks so much. You earned a sub, like and view!
@mattmarkham4734
@mattmarkham4734 8 месяцев назад
Thanks for this! How do you pull the date of submissions or comments?
@connorcreate
@connorcreate 8 месяцев назад
Both the submission and comment should have a "created_utc" field that you can access. praw.readthedocs.io/en/stable/code_overview/models/submission.html
@krissradev6708
@krissradev6708 8 месяцев назад
please bro keep going. put more effort into youtube and upload more videos. keep up the good work!
@priyanshusingh5708
@priyanshusingh5708 6 месяцев назад
That was a great help ,thanks ❤
@larsondavis8155
@larsondavis8155 4 месяца назад
Bro, I love it. Keep at it. Thank you.
@DivineDutz
@DivineDutz 5 месяцев назад
I dont know code but your video is great thank you, you inspired me to learn coding
@connorcreate
@connorcreate 5 месяцев назад
Glad I could help!
@kemal6039
@kemal6039 7 месяцев назад
Thanks so much! I've written my first bot in 3 hours after watching this video. I have a question though. My bot replies to comments and it keeps making me wait for 10 minutes after each comment. I even added a random (between 5-20 secs) delay after making each comment but it didn't fix it. I'm guessing it's because we're using test_bot as user agent but I'm not sure. How can I fix it?
@connorcreate
@connorcreate 7 месяцев назад
This is most certainly reddit's automated system kicking in to limit new accounts. The only way around that is to get some karma on the bot account. You can read more about it here: www.reddit.com/r/NewToReddit/comments/p8t966/reddit_and_karma_explained/ Essentially, you're going to need to either post in subreddits in the hope of getting enough upvotes or obtain an account with enough karma by other means. I recommend in this video to use a new account because it's risky using a bot on your main account and so I look out for you in that regard, but this is one of the downsides of that. Hope this helps!
@kemal6039
@kemal6039 7 месяцев назад
@@connorcreate Thanks a lot! My (new) account got suspended but now I know how to avoid it for the next time lol.
@connorcreate
@connorcreate 7 месяцев назад
What was the reason they suspended your account?
@MarcosPolanco
@MarcosPolanco 4 месяца назад
Quite a good intro. Thx!
@Evos-rr2fy
@Evos-rr2fy Месяц назад
it will be more interesting if you add gpt that can comment based on what you gave him as prompt if it's possible to post a video like that will be much appreciated
@coderflowerdev
@coderflowerdev 2 месяца назад
Thank you for this great tutorial! Now I can continue making my brainrot reddit video generator....
@HR114._.
@HR114._. 3 месяца назад
Thanks for the video!!
@ProNoob091
@ProNoob091 3 месяца назад
An error occurred: invalid_grant error processing request what should i do all my credentials are correct even though
@connorcreate
@connorcreate 3 месяца назад
I've had issues like this before and I usually just end up redoing the credentials setup steps and it works. I wouldn't know where to begin if that didn't work, maybe posting on the redditdev subreddit would be helpful if you get to that point.
@GoProLewis
@GoProLewis 7 месяцев назад
Thanks!! Id love a part 2.
@connorcreate
@connorcreate 7 месяцев назад
What would you like in particular for part 2?
@Cleancarcollective
@Cleancarcollective 7 месяцев назад
@@connorcreateI'd really like to learn how to integrate chat-gpt to respond to some of the top comments on a given post.
@connorcreate
@connorcreate 7 месяцев назад
I think I'm going to make a tutorial that uses the chatgpt api and then maybe one for your specific use case. I made a video about a year ago that was me using chatgpt to comment on Reddit so I might as well make a tutorial. Keep an eye out!
@larsondavis8155
@larsondavis8155 4 месяца назад
I subbed. Yas!
@krissradev6708
@krissradev6708 8 месяцев назад
does praw make it easier for reddit to detect your bot?
@connorcreate
@connorcreate 8 месяцев назад
Reddit knows that you're using API access the moment you setup the user agent in reddit user prefs so I wouldn't say that praw adds an extra layer of noticeability. For the most part I've found that reddit doesn't care that you're botting an account so long as you're not breaking any other rules. Subreddits can make the decision to ban the bot on their own but they don't have access to your account details like whether or not you're using an API key and can only tell if the content it posts seems automated but I may be incorrect about that.
@krissradev6708
@krissradev6708 8 месяцев назад
@@connorcreate thank you for your reply! I was wondering if i recreate the bot with python playwright == browser automation instead of API. Do you think that way accounts will have higher survival rate?
@connorcreate
@connorcreate 8 месяцев назад
@@krissradev6708 I would say probably, though I would only worry about account survivability if you are actually breaking their rules. If you are staying within the bounds of reddits rules and even making accounts that just spit out chatgpt output you wouldn't have much issue keeping the account alive platform wide, you may just get banned from a subreddit when you post in it. But if you are specifically trying to avoid detection from reddit then browser simulation would be much better than this option.
@krissradev6708
@krissradev6708 8 месяцев назад
@@connorcreate yea i am actually working with NSFW niches. thats my main concern. but again nsfw is not against reddit rules. i guess will have to find out
@connorcreate
@connorcreate 8 месяцев назад
@@krissradev6708 yeah I remember there's some nuances with the new rules. I used to run some nsfw Discord bots that pulled from reddit using praw and it wasn't an issue back then but with the new API I don't think you're able to display images from the API.
@ZYZErbx
@ZYZErbx 5 месяцев назад
Time to use the u/fuckoff bot 😭
@hqcart1
@hqcart1 7 месяцев назад
dude, i registered reddit with google, where is my password?
@connorcreate
@connorcreate 7 месяцев назад
Hmmm I never ran into this issue. Let me look into it for a bit.
@connorcreate
@connorcreate 7 месяцев назад
It seems as though the consensus online is to make a new account with just password protection or you can try the unconfirmed method of resetting your password on your reddit account with google auth setup, though I'm not sure about that second option. Can also try a read only instance but the best option is to use a new account imo. praw.readthedocs.io/en/stable/getting_started/authentication.html#application-only-client-credentials-flow
@hqcart1
@hqcart1 7 месяцев назад
@@connorcreatethanks dude, i tried everything, i ended up creating another account and your example worked perfect! i wanted to ask how can i include in image in my post? thanks a lot!
@connorcreate
@connorcreate 7 месяцев назад
@hqcart1 To post an image just use the subreddit.submit_image() functionality like so. Make sure to change the image path to your image on the computer. title = "A picture" image = "/path/to/image.png" reddit_instance.subreddit("testingground4bots").submit_image(title, image) If you want to put an image in the selftext of your post you're going to want to use this code below. This will post an image to testingground4bots but you need to change the path specified in "path" to your local image. The {image1} is where the image should be inserted. from praw.models import InlineImage image = InlineImage(path="path/to/image.jpg", caption="optional caption") selftext = "Text with an image {image1}" reddit_instance.subreddit("testingground4bots").submit("title", inline_media=media, selftext=selftext)
@TriflingToad
@TriflingToad 3 месяца назад
What bots are you guys trying to make? I'm trying to make a bot that will say what %age of words are in the bible
@pranjal8425
@pranjal8425 3 месяца назад
hah, that seems like fun. I'm trying to make a bot that gives relationship advice based really bad romance novels.
@ZYZErbx
@ZYZErbx 5 месяцев назад
I’m probably going to do something stupid with this info! Thanks!
Далее
Building a Chatbot with ChatGPT API and Reddit Data
27:35
Brilliant Budget-Friendly Tips for Car Painting!
00:28
We finally APPROVED @ZachChoi
00:31
Просмотров 3,2 млн
How-to Use The Reddit API in Python
23:21
Просмотров 54 тыс.
I Created A Reddit Bot!
6:49
Просмотров 101
Automated Video Editing with MoviePy in Python
14:07
Просмотров 105 тыс.
Making Automatic YouTube videos with Python
7:32
Просмотров 190 тыс.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Просмотров 1,6 млн
How I make bots using python (educational)
17:12
Просмотров 547 тыс.
Brilliant Budget-Friendly Tips for Car Painting!
00:28