[reddit] restrict subreddit search results (#7025)

This commit is contained in:
Mike Fährmann
2025-02-19 20:05:48 +01:00
parent d4c56b08d7
commit 7a11d02e7a
2 changed files with 13 additions and 0 deletions

View File

@@ -259,6 +259,8 @@ class RedditSubredditExtractor(RedditExtractor):
self.subreddit, sub, params = match.groups()
self.params = text.parse_query(params)
if sub:
if sub == "search" and "restrict_sr" not in self.params:
self.params["restrict_sr"] = "1"
self.subcategory += "-" + sub
RedditExtractor.__init__(self, match)