diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-03-18 19:59:01 +0100 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2021-04-10 15:38:33 +0200 |
| commit | eaa694fb7d0e47b943bc6d6edb6cb6a40ab2d85e (patch) | |
| tree | 024786c8a7003be24bbc566cb8c8e734a143f99d /searx/engines/stackoverflow.py | |
| parent | 111180705b6f3b142732eb6325de1346f6372828 (diff) | |
[enh] replace requests by httpx
Diffstat (limited to 'searx/engines/stackoverflow.py')
| -rw-r--r-- | searx/engines/stackoverflow.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py index 91eaa68e9..8fc2cdb3a 100644 --- a/searx/engines/stackoverflow.py +++ b/searx/engines/stackoverflow.py @@ -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 = [] |