瀏覽代碼

fix xpath of yandex

Noémi Ványi 8 年之前
父節點
當前提交
553f3a3a1a
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      searx/engines/yandex.py

+ 2
- 2
searx/engines/yandex.py 查看文件

@@ -29,10 +29,10 @@ language_map = {'ru': 'ru',
29 29
 base_url = 'https://yandex.{tld}/'
30 30
 search_url = 'search/?{query}&p={page}'
31 31
 
32
-results_xpath = '//div[@class="serp-item serp-item_plain_yes clearfix i-bem"]'
32
+results_xpath = '//li[@class="serp-item"]'
33 33
 url_xpath = './/h2/a/@href'
34 34
 title_xpath = './/h2/a//text()'
35
-content_xpath = './/div[@class="serp-item__text"]//text()'
35
+content_xpath = './/div[@class="text-container typo typo_text_m typo_line_m organic__text"]//text()'
36 36
 
37 37
 
38 38
 def request(query, params):