From a130c65edfdd9376af1ce26aebe986652981a1dd Mon Sep 17 00:00:00 2001 From: Shane Date: Mon, 12 May 2025 22:09:10 +1000 Subject: [PATCH] try --- foodie_automator_reddit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/foodie_automator_reddit.py b/foodie_automator_reddit.py index 58a70bc..2d15cf8 100644 --- a/foodie_automator_reddit.py +++ b/foodie_automator_reddit.py @@ -271,7 +271,7 @@ def fetch_duckduckgo_news_context(title, hours=24): return title def fetch_reddit_posts(): - """Fetch Reddit posts from specified subreddits, filtering low-quality posts.""" + """Fetch Reddit posts from specified subreddits, filtering low-quality and [homemade] posts.""" try: reddit = praw.Reddit( client_id=REDDIT_CLIENT_ID, @@ -301,6 +301,9 @@ def fetch_reddit_posts(): if pub_date < cutoff_date: logging.info(f"Skipping old post: {submission.title} (Published: {pub_date})") continue + if "[homemade]" in submission.title.lower(): + logging.info(f"Skipping homemade post: {submission.title}") + continue cleaned_title = clean_reddit_title(submission.title) if not cleaned_title or len(cleaned_title) < 5: logging.info(f"Skipping post with invalid or short title: {submission.title}")