diff --git a/.env.example b/.env.example index 5dbf49c..f3fe3df 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,7 @@ REDDIT_AUTH_TOKEN="" REDDIT_REFRESH_TOKEN="" REDDIT_CLIENT_ID="" REDDIT_CLIENT_SECRET="" +REDDIT_SUBREDDIT="" MASTODON_URL="" MASTODON_EMAIL="" MASTODON_PASSWORD="" diff --git a/script.py b/script.py index ba7d157..450b6a2 100644 --- a/script.py +++ b/script.py @@ -26,7 +26,7 @@ mastodon = Mastodon( # get recent posts to check for duplicates last_posts = mastodon.account_statuses(getenv("MASTODON_USER_ID"), limit=15) -for submission in reddit.subreddit("ich_iel").top(time_filter="day", limit=10): +for submission in reddit.subreddit(str(getenv("REDDIT_SUBREDDIT"))).top(time_filter="day", limit=10): # skip post if it is a stickied post if (submission.stickied): continue