mirror of
https://github.com/searxng/searxng
synced 2024-11-18 15:26:25 +00:00
[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]:
|
def request(query, params: Dict[str, Any]) -> Dict[str, Any]:
|
||||||
search_url: str = base_url + "/search?q={search_query}"
|
search_url: str = base_url + "/search?q={search_query}&lang={lang}"
|
||||||
params["url"] = search_url.format(search_query=quote(query))
|
lang: str = ""
|
||||||
|
if params["language"] != "all":
|
||||||
|
lang = params["language"]
|
||||||
|
|
||||||
|
params["url"] = search_url.format(search_query=quote(query), lang=lang)
|
||||||
|
print(params)
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
@ -298,8 +298,8 @@ engines:
|
|||||||
disabled: true
|
disabled: true
|
||||||
|
|
||||||
- name: anna's archive
|
- name: anna's archive
|
||||||
engine: annas-archive
|
engine: annas_archive
|
||||||
paging: False
|
paging: false
|
||||||
categories: files
|
categories: files
|
||||||
disabled: true
|
disabled: true
|
||||||
shortcut: aa
|
shortcut: aa
|
||||||
|
Loading…
Reference in New Issue
Block a user