unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26148: 25.1; Results from eww DuckDuckGo searches cannot be loaded
@ 2017-03-17 20:50 stp
  2017-06-02  6:02 ` Tim Landscheidt
  0 siblings, 1 reply; 4+ messages in thread
From: stp @ 2017-03-17 20:50 UTC (permalink / raw)
  To: 26148

Found in Emacs 25.1.1 but looks to be the same on master.  Using emacs
-Q, run M-x eww to do a search and then click on one of the search
results - the following error page will be displayed:

    'Oops, there was an error. Please try again.
    If it persists, please email ops@duckduckgo.com'

This appears to be due to DDG trying to use a redirect to load the
result - this can be disabled (see https://duckduckgo.com/params for
details) by adding "kd=-1" to the query string in the URL in which case
the results can be loaded as expected.  Turning off redirects is less
secure, but as we're using HTTPS anyway this shouldn't be a problem (see
https://duckduckgo.com/privacy#s5).

Should be able to fix with:

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index c9f4e61..0066f54 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -49,7 +49,7 @@ eww-header-line-format
   :group 'eww
   :type 'string)

-(defcustom eww-search-prefix "https://duckduckgo.com/html/?q="
+(defcustom eww-search-prefix "https://duckduckgo.com/html/?kd=-1&q="
   "Prefix URL to search engine."
   :version "24.4"
   :group 'eww


Cheers!





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-02 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17 20:50 bug#26148: 25.1; Results from eww DuckDuckGo searches cannot be loaded stp
2017-06-02  6:02 ` Tim Landscheidt
2017-06-02 12:00   ` Stephen Perry
2017-06-02 22:47     ` npostavs

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).