summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorPaolo Basso <12545838+paolobasso99@users.noreply.github.com>2023-06-25 17:24:28 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-06-29 09:32:57 +0200
commit7adb9090e5dbc25b0d120772beca01dc4eb0791e (patch)
treeebb4dca4e7aa6955b6fbacd91ae4720e3197ce62 /searx/engines
parente5637fe7b98d7fb06cbbe0e0f24deb12a33187ba (diff)
downloadsearxng-7adb9090e5dbc25b0d120772beca01dc4eb0791e.tar.gz
searxng-7adb9090e5dbc25b0d120772beca01dc4eb0791e.zip
[mod] engine: Anna's Archive - add language support
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/annas_archive.py (renamed from searx/engines/annas-archive.py)9
1 files changed, 7 insertions, 2 deletions
diff --git a/searx/engines/annas-archive.py b/searx/engines/annas_archive.py
index 56d1ca77a..1d5aa41ee 100644
--- a/searx/engines/annas-archive.py
+++ b/searx/engines/annas_archive.py
@@ -36,8 +36,13 @@ xpath_file_info: str = './/div[contains(@class, "text-xs")]'
def request(query, params: Dict[str, Any]) -> Dict[str, Any]:
- search_url: str = base_url + "/search?q={search_query}"
- params["url"] = search_url.format(search_query=quote(query))
+ search_url: str = base_url + "/search?q={search_query}&lang={lang}"
+ lang: str = ""
+ if params["language"] != "all":
+ lang = params["language"]
+
+ params["url"] = search_url.format(search_query=quote(query), lang=lang)
+ print(params)
return params