Extracted subreddit into a new env variable
This commit is contained in:
parent
0c7af6afa6
commit
d328fc0a7b
2 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ REDDIT_AUTH_TOKEN=""
|
|||
REDDIT_REFRESH_TOKEN=""
|
||||
REDDIT_CLIENT_ID=""
|
||||
REDDIT_CLIENT_SECRET=""
|
||||
REDDIT_SUBREDDIT=""
|
||||
MASTODON_URL=""
|
||||
MASTODON_EMAIL=""
|
||||
MASTODON_PASSWORD=""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue