diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2023-02-03 08:45:51 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2023-02-03 08:45:51 +0100 |
commit | 257dc7d6c40a8c4bae682c6e7e6b764a98c4ec96 (patch) | |
tree | a8bcbb596108b9941b9c65bdd04b047ba9d90ea2 /searx/engines/duckduckgo.py | |
parent | d9ab83642f3b398c36f808bd8b08dc3b482722f4 (diff) | |
download | searxng-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.py | 2 |
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: |