mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
[mod] engine: Anna's Archive - add language support
This commit is contained in:
parent
e5637fe7b9
commit
7adb9090e5
2 changed files with 9 additions and 4 deletions
|
@ -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 a new issue