summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2023-04-02 19:25:10 +0200
committerGitHub <noreply@github.com>2023-04-02 19:25:10 +0200
commitb8100e4e160c24494d3beabaee7e229a10b53523 (patch)
tree3aa7bd0455cf62e0a5727825ef3b69643552ab17
parenta5155a32c0a3392bf0f1aef97bc2e41393f94b24 (diff)
parent0430662189676be3807099fca992bd318fec3dc1 (diff)
downloadsearxng-b8100e4e160c24494d3beabaee7e229a10b53523.tar.gz
searxng-b8100e4e160c24494d3beabaee7e229a10b53523.zip
Merge pull request #2308 from return42/fix-1959-2
[fix] engine google-News: fix decoding of URLs (part 2)
-rw-r--r--searx/engines/google_news.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index 2cee2e2c1..4b1bffa30 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -150,7 +150,7 @@ def response(resp):
href = href.split('?')[0]
href = href.split('/')[-1]
href = base64.urlsafe_b64decode(href + '====')
- href = href[4:].split(b'\xd2')[0]
+ href = href[href.index(b'http') :].split(b'\xd2')[0]
href = href.decode()
title = extract_text(eval_xpath(result, './article/h3[1]'))