Sort subreddits by new posts.

This commit is contained in:
2025-07-21 17:15:26 +02:00
parent 71890d1a57
commit e6a853ed38

View File

@@ -54,7 +54,7 @@ def scan_subreddits(reddit, subreddits_list, post_limit=25, comment_limit=100):
subreddit = reddit.subreddit(subreddit_name) subreddit = reddit.subreddit(subreddit_name)
print(f"Scanning r/{subreddit_name}...") print(f"Scanning r/{subreddit_name}...")
for submission in subreddit.hot(limit=post_limit): for submission in subreddit.new(limit=post_limit):
# --- 1. Process the Post Title and Body --- # --- 1. Process the Post Title and Body ---
post_text = submission.title + " " + submission.selftext post_text = submission.title + " " + submission.selftext
tickers_in_post = extract_tickers(post_text) tickers_in_post = extract_tickers(post_text)