diff options
-rw-r--r-- | requirements-dev.txt | 2 | ||||
-rw-r--r-- | searx/engines/duckduckgo.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/requirements-dev.txt b/requirements-dev.txt index 5bc333983..b543fad81 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ mock==5.0.2 nose2[coverage_plugin]==0.13.0 cov-core==1.15.0 black==22.12.0 -pylint==2.17.3 +pylint==2.17.4 splinter==0.19.0 selenium==4.9.0 twine==4.0.2 diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 4dd23c759..d37e28c2d 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -94,12 +94,12 @@ def get_vqd(query, headers): logger.debug("re-use cached vqd value: %s", value) return value - query_url = 'https://duckduckgo.com/?{query}&iar=images'.format(query=urlencode({'q': query})) + query_url = 'https://duckduckgo.com/?q={query}&atb=v290-5'.format(query=urlencode({'q': query})) res = network.get(query_url, headers=headers) content = res.text - if content.find('vqd=\'') == -1: + if content.find('vqd=\"') == -1: raise SearxEngineAPIException('Request failed') - value = content[content.find('vqd=\'') + 5 :] + value = content[content.find('vqd=\"') + 5 :] value = value[: value.find('\'')] logger.debug("new vqd value: %s", value) cache_vqd(query, value) |