From 902677a378669a16ecc5dd82708d9b2104a89237 Mon Sep 17 00:00:00 2001 From: Gordon Shumway Date: Mon, 6 Jul 2020 15:26:55 -0400 Subject: [PATCH] DDG: Fix redirect detection. --- plugins/DDG/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/DDG/plugin.py b/plugins/DDG/plugin.py index 991e856b9..47b0b8fa9 100644 --- a/plugins/DDG/plugin.py +++ b/plugins/DDG/plugin.py @@ -105,7 +105,7 @@ class DDG(callbacks.Plugin): # As of 2017-01-20, some links on DuckDuckGo's site are shown going through # a redirect service. The links are in the format "/l/?kh=-1&uddg=https%3A%2F%2Fduckduckgo.com%2F" # instead of simply being "https://duckduckgo.com". So, we decode these links here. - if link.startswith('/l/'): + if link.startswith('/l/') or link.startswith('//duckduckgo.com/l/'): linkparse = utils.web.urlparse(link) try: link = parse_qs(linkparse.query)['uddg'][0]