Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7928f3938d
|
@ -281,9 +281,17 @@ def main():
|
||||
continue
|
||||
|
||||
post_date = extract_post_date(entry)
|
||||
if post_date < now - max_age:
|
||||
logger.info(f"⏩ Skipping old post (older than {MAX_POST_AGE_DAYS} days): {post_id}")
|
||||
continue
|
||||
|
||||
# New logic: only today's posts if MAX_POST_AGE_DAYS = 0
|
||||
if MAX_POST_AGE_DAYS == 0:
|
||||
if post_date.date() < now.date():
|
||||
logger.info(f"⏩ Skipping post from previous day: {post_id}")
|
||||
continue
|
||||
else:
|
||||
if post_date < now - max_age:
|
||||
logger.info(f"⏩ Skipping old post (older than {MAX_POST_AGE_DAYS} days): {post_id}")
|
||||
continue
|
||||
|
||||
|
||||
title = entry.get("title", "").strip()
|
||||
link = entry.get("link", "").strip()
|
||||
|
Reference in New Issue
Block a user