mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 00:09:18 +02:00
[enh] replace requests by httpx
This commit is contained in:
parent
111180705b
commit
eaa694fb7d
18 changed files with 527 additions and 204 deletions
|
@ -3,7 +3,7 @@
|
|||
Stackoverflow (IT)
|
||||
"""
|
||||
|
||||
from urllib.parse import urlencode, urljoin, urlparse
|
||||
from urllib.parse import urlencode, urljoin
|
||||
from lxml import html
|
||||
from searx.utils import extract_text
|
||||
from searx.exceptions import SearxEngineCaptchaException
|
||||
|
@ -41,8 +41,7 @@ def request(query, params):
|
|||
|
||||
# get response from search-request
|
||||
def response(resp):
|
||||
resp_url = urlparse(resp.url)
|
||||
if resp_url.path.startswith('/nocaptcha'):
|
||||
if resp.url.path.startswith('/nocaptcha'):
|
||||
raise SearxEngineCaptchaException()
|
||||
|
||||
results = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue