From c6ed0dae6ca021900824a71bcf0e3be430a39bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sun, 11 Dec 2016 04:30:36 +0100 Subject: [PATCH 1/4] fix google play movies xpath --- searx/settings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/settings.yml b/searx/settings.yml index ef703fba4..30d31a91d 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -250,8 +250,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 From 85f363774c94ae8db67bea5de9eddcba4d2757a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sun, 11 Dec 2016 04:47:22 +0100 Subject: [PATCH 2/4] fix habrahabr xpath --- searx/settings.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/settings.yml b/searx/settings.yml index 30d31a91d..1dff8a9f3 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -282,8 +282,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 From 553f3a3a1a72f0f0ba60f739fce5d6b22f23cb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sun, 11 Dec 2016 04:57:42 +0100 Subject: [PATCH 3/4] fix xpath of yandex --- searx/engines/yandex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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): From 9c8ec209e14a1078a723ec0dcd1564c34d8e04e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Sun, 11 Dec 2016 11:41:55 +0100 Subject: [PATCH 4/4] [mod] add timeout to gigablast --- searx/settings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/searx/settings.yml b/searx/settings.yml index 1dff8a9f3..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