all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: stp@ekioh.com
To: 26148@debbugs.gnu.org
Subject: bug#26148: 25.1; Results from eww DuckDuckGo searches cannot be loaded
Date: Fri, 17 Mar 2017 20:50:14 +0000	[thread overview]
Message-ID: <m2pohfeigp.fsf@Stephens-MBP.cable.virginmedia.net> (raw)

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!





             reply	other threads:[~2017-03-17 20:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17 20:50 stp [this message]
2017-06-02  6:02 ` bug#26148: 25.1; Results from eww DuckDuckGo searches cannot be loaded Tim Landscheidt
2017-06-02 12:00   ` Stephen Perry
2017-06-02 22:47     ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pohfeigp.fsf@Stephens-MBP.cable.virginmedia.net \
    --to=stp@ekioh.com \
    --cc=26148@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.