diff options
| author | Alexandre Flament <alex@al-f.net> | 2020-12-09 21:23:20 +0100 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2020-12-11 14:37:08 +0100 |
| commit | d703119d3a313a406482b121ee94c6afee3bc307 (patch) | |
| tree | 7834dc899b99db4ea3f9f81542e8e029bf5b7d04 /searx/engines/wikidata.py | |
| parent | 033f39bff7b3365256491014140e35aa1e974d4e (diff) | |
[enh] add raise_for_httperror
check HTTP response:
* detect some comme CAPTCHA challenge (no solving). In this case the engine is suspended for long a time.
* otherwise raise HTTPError as before
the check is done in poolrequests.py (was before in search.py).
update qwant, wikipedia, wikidata to use raise_for_httperror instead of raise_for_status
Diffstat (limited to 'searx/engines/wikidata.py')
| -rw-r--r-- | searx/engines/wikidata.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py index 60d0dc9a0..8d787caac 100644 --- a/searx/engines/wikidata.py +++ b/searx/engines/wikidata.py @@ -161,9 +161,6 @@ def request(query, params): def response(resp): results = [] - if resp.status_code != 200: - logger.debug('SPARQL endpoint error %s', resp.content.decode()) - resp.raise_for_status() jsonresponse = loads(resp.content.decode()) language = resp.search_params['language'].lower() |