diff --git a/application/parser/remote/reddit_loader.py b/application/parser/remote/reddit_loader.py index 3c9f93ea..0230653a 100644 --- a/application/parser/remote/reddit_loader.py +++ b/application/parser/remote/reddit_loader.py @@ -11,6 +11,7 @@ class RedditPostsLoaderRemote(BaseRemote): categories = data.get("categories", ["new", "hot"]) mode = data.get("mode", "subreddit") search_queries = data.get("search_queries") + number_posts = data.get("number_posts", 10) self.loader = RedditPostsLoader( client_id=client_id, client_secret=client_secret, @@ -18,7 +19,7 @@ class RedditPostsLoaderRemote(BaseRemote): categories=categories, mode=mode, search_queries=search_queries, - number_posts=10, + number_posts=number_posts, ) documents = self.loader.load() print(f"Loaded {len(documents)} documents from Reddit") diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 1614375d..45fc4e1a 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -22,6 +22,7 @@ export default function Upload({ client_secret: '', user_agent: '', search_queries: [''], + number_posts: 10, }); const urlOptions: { label: string; value: string }[] = [ { label: 'Crawler', value: 'crawler' }, @@ -388,6 +389,19 @@ export default function Upload({ Search queries + +
+ + Number of posts + +
)}