Browse Source

[fix] google news xpath

Marc Abonce Seguin 6 years ago
parent
commit
835d1edd58
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      searx/engines/google_news.py

+ 2
- 2
searx/engines/google_news.py View File

68
     for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
68
     for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
69
         try:
69
         try:
70
             r = {
70
             r = {
71
-                'url': result.xpath('.//a[@class="l _PMs"]')[0].attrib.get("href"),
72
-                'title': ''.join(result.xpath('.//a[@class="l _PMs"]//text()')),
71
+                'url': result.xpath('.//a[@class="l lLrAF"]')[0].attrib.get("href"),
72
+                'title': ''.join(result.xpath('.//a[@class="l lLrAF"]//text()')),
73
                 'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
73
                 'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
74
             }
74
             }
75
         except:
75
         except: