kusa04 commited on
Commit
ca782c7
·
verified ·
1 Parent(s): 635eef7

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +1 -1
functions.py CHANGED
@@ -34,7 +34,7 @@ def scrape_reddit_data(search_query, total_limit):
34
  subreddit = reddit.subreddit("all")
35
  posts_data = []
36
  # Iterate over submissions based on the search query and limit
37
- for i, submission in enumerate(subreddit.search(search_query, sort="new", limit=total_limit)):
38
  # No UI updates here as caching does not allow live progress updates
39
  if submission.title and submission.selftext:
40
  posts_data.append([
 
34
  subreddit = reddit.subreddit("all")
35
  posts_data = []
36
  # Iterate over submissions based on the search query and limit
37
+ for i, submission in enumerate(subreddit.search(search_query, sort="relevance", limit=total_limit)):
38
  # No UI updates here as caching does not allow live progress updates
39
  if submission.title and submission.selftext:
40
  posts_data.append([