mirror of
https://github.com/searxng/searxng.git
synced 2025-01-17 05:45:24 +00:00
[fix] google news xpath
This commit is contained in:
parent
343e555ee9
commit
835d1edd58
1 changed files with 2 additions and 2 deletions
|
@ -68,8 +68,8 @@ def response(resp):
|
||||||
for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
|
for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
|
||||||
try:
|
try:
|
||||||
r = {
|
r = {
|
||||||
'url': result.xpath('.//a[@class="l _PMs"]')[0].attrib.get("href"),
|
'url': result.xpath('.//a[@class="l lLrAF"]')[0].attrib.get("href"),
|
||||||
'title': ''.join(result.xpath('.//a[@class="l _PMs"]//text()')),
|
'title': ''.join(result.xpath('.//a[@class="l lLrAF"]//text()')),
|
||||||
'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
|
'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
|
||||||
}
|
}
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in a new issue