mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +02:00
[fix] duckduckgo engine: "!ddg !g" do not redirect to google
* searx understand "!ddg !g time" as : send "!g time" to DDG * !g a DDG bang for Google: DDG return a HTTP redirect to Google This commit adds a the allows_redirect param not to follow HTTP redirect. The DDG engine returns a empty result as before without HTTP redirect.
This commit is contained in:
parent
d76660463b
commit
c22d4c764c
3 changed files with 12 additions and 1 deletions
|
@ -73,6 +73,10 @@ class OnlineProcessor(EngineProcessor):
|
|||
if max_redirects:
|
||||
request_args['max_redirects'] = max_redirects
|
||||
|
||||
# allow_redirects
|
||||
if 'allow_redirects' in params:
|
||||
request_args['allow_redirects'] = params['allow_redirects']
|
||||
|
||||
# soft_max_redirects
|
||||
soft_max_redirects = params.get('soft_max_redirects', max_redirects or 0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue