diff options
author | Daniel Kukula <daniel.kuku@gmail.com> | 2024-05-16 20:44:34 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-05-28 11:55:59 +0200 |
commit | 87165ac5322ab87a8b5bfded2c749a79b4958dca (patch) | |
tree | 2e3d66d70c8163e539561ef58cf360ee890b395f /searx/engines | |
parent | 75e4b65127668a1d3bfe559ecca38687b6433a7c (diff) | |
download | searxng-87165ac5322ab87a8b5bfded2c749a79b4958dca.tar.gz searxng-87165ac5322ab87a8b5bfded2c749a79b4958dca.zip |
[mod] engine hex: add sort_criteria & page_size to configuration
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/hex.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/hex.py b/searx/engines/hex.py index 2c1036f4d..4c4920f68 100644 --- a/searx/engines/hex.py +++ b/searx/engines/hex.py @@ -21,6 +21,9 @@ categories = ["it", "packages"] # engine dependent config paging = True search_url = "https://hex.pm/api/packages/" +# Valid values: name inserted_at updated_at total_downloads recent_downloads +sort_criteria = "recent_downloads" +page_size = 10 linked_terms = { # lower-case : replacement @@ -47,7 +50,7 @@ linked_terms = { def request(query: str, params): - args = urlencode({"page": params["pageno"], "search": query}) + args = urlencode({"page": params["pageno"], "per_page": page_size, "sort": sort_criteria, "search": query}) params["url"] = f"{search_url}?{args}" return params |