Spaces:
Sleeping
Sleeping
Update functions.py
Browse files- 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="
|
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([
|