From 2aa7922a0953877be5e9cc472692f197fd914697 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Sat, 31 Dec 2022 11:58:13 -0500 Subject: [PATCH] check for yeah man --- app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 44e824e..2eb9b4d 100644 --- a/app.py +++ b/app.py @@ -1,9 +1,12 @@ import praw +import re reddit = praw.Reddit('bot1') subreddit = reddit.subreddit('mahuntingtontest') for comment in subreddit.stream.comments(skip_existing=True): - if comment.author != 'jazzbot2pointw000': + print(comment.id + " - " + comment.author.name + ": " + comment.body) + if comment.author != 'jazzbot2pointw000' and re.search('yeah,?\sman', comment.body, re.I): comment.reply('yeah man') - print(comment.id) + print('replied') + print('-----')