Sfoglia il codice sorgente

[fix] google news xpath

Marc Abonce Seguin 6 anni fa
parent
commit
835d1edd58
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      searx/engines/google_news.py

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

@@ -68,8 +68,8 @@ def response(resp):
68 68
     for result in dom.xpath('//div[@class="g"]|//div[@class="g _cy"]'):
69 69
         try:
70 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 73
                 'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
74 74
             }
75 75
         except: