summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-04-02 18:35:56 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-04-02 19:19:59 +0200
commit0430662189676be3807099fca992bd318fec3dc1 (patch)
tree3aa7bd0455cf62e0a5727825ef3b69643552ab17 /searx/engines
parenta5155a32c0a3392bf0f1aef97bc2e41393f94b24 (diff)
downloadsearxng-0430662189676be3807099fca992bd318fec3dc1.tar.gz
searxng-0430662189676be3807099fca992bd318fec3dc1.zip
[fix] engine google-News: fix decoding of URLs (part 2)
Follow up of 8de8070ed to fix the issue reported by AlyoshaVasilieva [1]. [1] https://github.com/searxng/searxng/issues/1959#issuecomment-1493300574 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines')
-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]'))