forked from zaclys/searxng
[mod] engine: Anna's Archive - add language support
This commit is contained in:
parent
e5637fe7b9
commit
7adb9090e5
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user