summaryrefslogtreecommitdiff
path: root/searx/engines/duckduckgo.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-02-03 08:45:51 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2023-02-03 08:45:51 +0100
commit257dc7d6c40a8c4bae682c6e7e6b764a98c4ec96 (patch)
treea8bcbb596108b9941b9c65bdd04b047ba9d90ea2 /searx/engines/duckduckgo.py
parentd9ab83642f3b398c36f808bd8b08dc3b482722f4 (diff)
downloadsearxng-257dc7d6c40a8c4bae682c6e7e6b764a98c4ec96.tar.gz
searxng-257dc7d6c40a8c4bae682c6e7e6b764a98c4ec96.zip
[fix-2146] set different HTTP Referer header to DuckDuckGo requests
For what ever reasons, ddg-lite don't like the Referer https://lite.duckduckgo.com/ In an interactive session in the WEB browser the the Reverer has exactly this value, but ddg-lite don't like this value when the request is build up by SearXNG. The new value is: https://google.com/ What fakes a user comes from a google link. Related: https://github.com/searxng/searxng/pull/2081 Closes: https://github.com/searxng/searxng/issues/2146 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines/duckduckgo.py')
-rw-r--r--searx/engines/duckduckgo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py
index 84198afc5..2a7956ca8 100644
--- a/searx/engines/duckduckgo.py
+++ b/searx/engines/duckduckgo.py
@@ -73,7 +73,7 @@ def request(query, params):
# link again and again ..
params['headers']['Content-Type'] = 'application/x-www-form-urlencoded'
- params['headers']['Referer'] = 'https://lite.duckduckgo.com/'
+ params['headers']['Referer'] = 'https://google.com/'
# initial page does not have an offset
if params['pageno'] == 2: