diff options
| author | Bnyro <bnyro@tutanota.com> | 2025-11-05 09:19:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-05 09:19:42 +0100 |
| commit | 3763b4bff4b6ad6d4d84ba74539755292d33bdec (patch) | |
| tree | 2e766dcb5f568f7c9ed09881adc9ae81718e5214 /searx | |
| parent | 52ffc4c7f43a0d8e257278d40efd6ab4b58e459f (diff) | |
[fix] engine ahmia blacklist, arch linux: use proper searxng user agent including version (#5414)
Diffstat (limited to 'searx')
| -rw-r--r-- | searx/engines/archlinux.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/archlinux.py b/searx/engines/archlinux.py index f3a2f2971..9b8e39a05 100644 --- a/searx/engines/archlinux.py +++ b/searx/engines/archlinux.py @@ -12,7 +12,7 @@ from urllib.parse import urlencode, urljoin, urlparse import lxml import babel -from searx.utils import extract_text, eval_xpath_list, eval_xpath_getindex +from searx.utils import extract_text, eval_xpath_list, eval_xpath_getindex, searxng_useragent from searx.enginelib.traits import EngineTraits from searx.locales import language_tag @@ -45,7 +45,7 @@ def request(query, params): query += ' (' + eng_lang + ')' # wiki.archlinux.org is protected by anubis # - https://github.com/searxng/searxng/issues/4646#issuecomment-2817848019 - params['headers']['User-Agent'] = "SearXNG" + params['headers']['User-Agent'] = searxng_useragent() elif netloc == 'wiki.archlinuxcn.org': base_url = 'https://' + netloc + '/wzh/index.php?' |