1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 04:01:40 +01:00

[mod] engine: Anna's Archive - add language support

This commit is contained in:
Paolo Basso 2023-06-25 17:24:28 +02:00 committed by Markus Heiser
parent e5637fe7b9
commit 7adb9090e5
2 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -298,8 +298,8 @@ engines:
disabled: true
- name: anna's archive
engine: annas-archive
paging: False
engine: annas_archive
paging: false
categories: files
disabled: true
shortcut: aa