mirror of
https://github.com/searxng/searxng.git
synced 2025-08-19 10:16:47 +02:00
[fix] tracker url remover + external bangs: use standard network config
Using plain `httpx` directly doesn't use SearXNG's additional network config, including proxies, http2 config, ... Related issues: - https://github.com/searxng/searxng/issues/5027
This commit is contained in:
parent
b95a3e905d
commit
5cbf422621
2 changed files with 5 additions and 6 deletions
|
@ -8,10 +8,10 @@ from :py:obj:`BANGS_URL`.
|
|||
"""
|
||||
|
||||
import json
|
||||
import httpx
|
||||
|
||||
from searx.external_bang import LEAF_KEY
|
||||
from searx.data import data_dir
|
||||
from searx.network import get as http_get
|
||||
|
||||
DATA_FILE = data_dir / 'external_bangs.json'
|
||||
|
||||
|
@ -24,7 +24,7 @@ HTTP_COLON = 'http:'
|
|||
|
||||
def main():
|
||||
print(f'fetch bangs from {BANGS_URL}')
|
||||
response = httpx.get(BANGS_URL)
|
||||
response = http_get(BANGS_URL)
|
||||
response.raise_for_status()
|
||||
ddg_bangs = json.loads(response.content.decode())
|
||||
trie = parse_ddg_bangs(ddg_bangs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue