Merge pull request #780 from kvch/google-play-movies-fix

XPATH engines: Google Play Music, Habrahabr, Yandex
This commit is contained in:
Adam Tauber 2016-12-11 13:08:18 +01:00 committed by GitHub
commit 75c58fd008
2 changed files with 7 additions and 6 deletions

View file

@ -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):

View file

@ -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