try
This commit is contained in:
@@ -393,6 +393,16 @@ def post_engagement_tweet():
|
||||
post_counts.append(author_count)
|
||||
save_post_counts(post_counts)
|
||||
|
||||
if author_count["month"] != datetime.now(timezone.utc).strftime("%Y-%m"):
|
||||
logging.info(f"Resetting monthly count for {username} due to new month")
|
||||
author_count["month"] = datetime.now(timezone.utc).strftime("%Y-%m")
|
||||
author_count["monthly_count"] = 0
|
||||
|
||||
if author_count["day"] != datetime.now(timezone.utc).strftime("%Y-%m-%d"):
|
||||
logging.info(f"Resetting daily count for {username} due to new day")
|
||||
author_count["day"] = datetime.now(timezone.utc).strftime("%Y-%m-%d")
|
||||
author_count["daily_count"] = 0
|
||||
|
||||
if author_count["monthly_count"] >= 500:
|
||||
logging.warning(f"Monthly post limit (500) reached for {username}, skipping")
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user