[Surfraw-devel] [PATCH 2/2] duckduckgo: explicitly provide redirect parameter

Tadas Slotkus makt at slotkus.lt
Thu Apr 27 22:35:52 UTC 2017


For w3m browser duckduckgo forces redirect if parameter is not provided,
however we want it to be forced when we provide the parameter.
---
 elvi/duckduckgo | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elvi/duckduckgo b/elvi/duckduckgo
index d377011..4290a58 100755
--- a/elvi/duckduckgo
+++ b/elvi/duckduckgo
@@ -12,7 +12,7 @@ w3_config_hook () {
     def     SURFRAW_duckduckgo_params              "&kg=g"
     defyn   SURFRAW_duckduckgo_https_arg           0
     defyn   SURFRAW_duckduckgo_safe_arg            0
-    defyn   SURFRAW_duckduckgo_redirect_arg        0
+    defyn   SURFRAW_duckduckgo_redirect_arg        -1
     defyn   SURFRAW_duckduckgo_use_javascript      0
     defyn   SURFRAW_duckduckgo_got_a_ducky_feeling 0
 }
@@ -68,6 +68,8 @@ fi
 
 if [ "$SURFRAW_duckduckgo_redirect_arg" = 1 ] ; then
     SURFRAW_duckduckgo_params="${SURFRAW_duckduckgo_params}&kd=1"
+else
+    SURFRAW_duckduckgo_params="${SURFRAW_duckduckgo_params}&kd=-1"
 fi
 
 if [ "$SURFRAW_graphical" != "yes" ] ; then
-- 
1.8.3.1




More information about the Surfraw-devel mailing list