summaryrefslogtreecommitdiff
path: root/searx/engines/duckduckgo_extra.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/duckduckgo_extra.py')
-rw-r--r--searx/engines/duckduckgo_extra.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo_extra.py b/searx/engines/duckduckgo_extra.py
index 7e3a3282d..25692add7 100644
--- a/searx/engines/duckduckgo_extra.py
+++ b/searx/engines/duckduckgo_extra.py
@@ -48,6 +48,13 @@ search_path_map = {'images': 'i', 'videos': 'v', 'news': 'news'}
def request(query, params):
+ # request needs a vqd argument
+ vqd = get_vqd(query)
+ if not vqd:
+ # some search terms do not have results and therefore no vqd value
+ params['url'] = None
+ return params
+
eng_region = traits.get_region(params['searxng_locale'], traits.all_locale)
eng_lang = get_ddg_lang(traits, params['searxng_locale'])
@@ -57,7 +64,7 @@ def request(query, params):
# 'u': 'bing',
'l': eng_region,
'f': ',,,,,',
- 'vqd': get_vqd(query),
+ 'vqd': vqd,
}
if params['pageno'] > 1: