1
0
Fork 0

Only search titles when finding previous daily post.

This commit is contained in:
Casper V. Kristensen 2019-04-15 15:14:37 +02:00
parent ee52278399
commit 3c972da834
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -23,4 +23,5 @@ def submit_post(title, text, subreddit) -> Submission:
def get_previous_daily_post(subreddit) -> Submission: def get_previous_daily_post(subreddit) -> Submission:
logger.info("Getting previous daily post from r/%s", subreddit) logger.info("Getting previous daily post from r/%s", subreddit)
return next(praw.subreddit(subreddit).search("daily release", sort="new", time_filter="week")) return next(praw.subreddit(subreddit).search('title:"daily releases"', sort="new", syntax="lucene",
time_filter="week"))