summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authormisnyo <misnyo@misnyo.eu>2017-08-31 17:48:07 +0200
committermisnyo <misnyo@misnyo.eu>2017-08-31 17:48:07 +0200
commit3182ba7069b2aa2fba1a1b7879bd5f234a4d2868 (patch)
treecedea711e5d1e8d13bcc7fb8365ea3660843dcd4 /searx
parente74aaa781e836eeac73af68aa1b4f5014b58b4d3 (diff)
downloadsearxng-3182ba7069b2aa2fba1a1b7879bd5f234a4d2868.tar.gz
searxng-3182ba7069b2aa2fba1a1b7879bd5f234a4d2868.zip
[fix] google news dom xpath fix
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/google_news.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index 7344b5289..8881d0dad 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -67,8 +67,8 @@ def response(resp):
for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
try:
r = {
- 'url': result.xpath('.//div[@class="_cnc"]//a/@href')[0],
- 'title': ''.join(result.xpath('.//div[@class="_cnc"]//h3//text()')),
+ 'url': result.xpath('.//a[@class="l _PMs"]')[0].attrib.get("href"),
+ 'title': ''.join(result.xpath('.//a[@class="l _PMs"]//text()')),
'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
}
except: