Last active
August 31, 2021 03:44
-
-
Save JakenHerman/9b491ee761044924e7b2a4a0657e4876 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import praw | |
from supabase_py import create_client, Client | |
reddit = praw.Reddit( | |
username = os.environ.get('REDDIT_USERNAME'), | |
password = os.environ.get('REDDIT_PASSWORD'), | |
client_id = os.environ.get('API_CLIENT'), | |
client_secret = os.environ.get('API_SECRET'), | |
user_agent = "Scooby Searcher Bot" | |
) | |
url: str = os.environ.get("SUPABASE_URL") | |
key: str = os.environ.get("SUPABASE_KEY") | |
supabase: Client = create_client(url, key) | |
for comment in reddit.subreddit('cartoons').comments(limit=1000): | |
if "scooby dooby doo" in comment.body.lower(): | |
comment.reply("Where are you?") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment