summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-11 13:08:18 +0100
committerGitHub <noreply@github.com>2016-12-11 13:08:18 +0100
commit75c58fd008e3d10dff788d133904a7904dd4635f (patch)
treec1a4a5e336a3ea19d882fb52c560da5dd45db33e
parente12ea9a5106a8b58080c0395c2fcf3f2a84808fe (diff)
parent9c8ec209e14a1078a723ec0dcd1564c34d8e04e7 (diff)
Merge pull request #780 from kvch/google-play-movies-fix
XPATH engines: Google Play Music, Habrahabr, Yandex
-rw-r--r--searx/engines/yandex.py4
-rw-r--r--searx/settings.yml9
2 files changed, 7 insertions, 6 deletions
diff --git a/searx/engines/yandex.py b/searx/engines/yandex.py
index 938fdd184..b83a747f9 100644
--- a/searx/engines/yandex.py
+++ b/searx/engines/yandex.py
@@ -29,10 +29,10 @@ language_map = {'ru': 'ru',
base_url = 'https://yandex.{tld}/'
search_url = 'search/?{query}&p={page}'
-results_xpath = '//div[@class="serp-item serp-item_plain_yes clearfix i-bem"]'
+results_xpath = '//li[@class="serp-item"]'
url_xpath = './/h2/a/@href'
title_xpath = './/h2/a//text()'
-content_xpath = './/div[@class="serp-item__text"]//text()'
+content_xpath = './/div[@class="text-container typo typo_text_m typo_line_m organic__text"]//text()'
def request(query, params):
diff --git a/searx/settings.yml b/searx/settings.yml
index ef703fba4..eee2903b6 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -192,6 +192,7 @@ engines:
- name : gigablast
engine : gigablast
shortcut : gb
+ timeout : 3.0
disabled: True
- name : gitlab
@@ -250,8 +251,8 @@ engines:
engine : xpath
search_url : https://play.google.com/store/search?q={query}&c=movies
url_xpath : //a[@class="title"]/@href
- title_xpath : //a[@class="title"]
- content_xpath : //a[@class="subtitle"]
+ title_xpath : //a[@class="title"]/@title
+ content_xpath : //a[contains(@class, "subtitle")]
categories : videos
shortcut : gpm
disabled : True
@@ -282,8 +283,8 @@ engines:
engine : xpath
paging : True
search_url : https://habrahabr.ru/search/page{pageno}/?q={query}
- url_xpath : //div[@class="search_results"]//a[@class="post_title"]/@href
- title_xpath : //div[@class="search_results"]//a[@class="post_title"]
+ url_xpath : //div[@class="search_results"]//a[contains(@class, "post__title_link")]/@href
+ title_xpath : //div[@class="search_results"]//a[contains(@class, "post__title_link")]
content_xpath : //div[@class="search_results"]//div[contains(@class, "content")]
categories : it
timeout : 4.0