Ignore r/ in environment subreddit names

This commit is contained in:
Callum Leslie committed 2022-06-04 02:00:19 +01:00
1 parent cd5924562f
commit 37f22b8b01
1 file changed
+1 -1
+1 -1
View File
@@ -35,7 +35,7 @@ def get_subreddit_threads():
)
if os.getenv("SUBREDDIT"):
subreddit = reddit.subreddit(os.getenv("SUBREDDIT"))
subreddit = reddit.subreddit(re.sub(r"r\/", "", os.getenv("SUBREDDIT")))
else:
# ! Prompt the user to enter a subreddit
try: