diff options
| author | Alexandre Flament <alex@al-f.net> | 2021-04-12 17:34:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-12 17:34:21 +0200 |
| commit | 01cefffbf6efa8a027e0e7d720970fffadb6337a (patch) | |
| tree | a4c37f7b73897c7635ee5fab01c1e8e967e23d8a /searx/engines/stackoverflow.py | |
| parent | 6c0114567e7ba1b3f4a54327eddf658b7474ca58 (diff) | |
| parent | d14994dc73ba5c95382812581dac146d9eceaafa (diff) | |
Merge pull request #1 from metasearch-lab/httpx_networks
Httpx networks
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 = [] |