[fix] fixes google play engines (#1651)

update commit 87baa74a86
This commit is contained in:
Alexandre Flament 2019-07-25 09:31:47 +02:00 committed by GitHub
parent cac8e7c6b8
commit f34b5cedb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View File

@ -111,13 +111,10 @@ def response(resp):
tmp_result = {'url': url, 'title': title, 'content': content} tmp_result = {'url': url, 'title': title, 'content': content}
# add thumbnail if available # add thumbnail if available
thumbnail = None
if thumbnail_xpath: if thumbnail_xpath:
thumbnail = extract_url( thumbnail_xpath_result = result.xpath(thumbnail_xpath)
result.xpath(thumbnail_xpath), search_url if len(thumbnail_xpath_result) > 0:
) tmp_result['img_src'] = extract_url(thumbnail_xpath_result, search_url)
if thumbnail:
tmp_result['img_src'] = thumbnail
results.append(tmp_result) results.append(tmp_result)
else: else:

View File

@ -321,7 +321,7 @@ engines:
title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a'
url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href'
content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]'
thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]/img/@data-src' thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src'
categories : files categories : files
shortcut : gpa shortcut : gpa
disabled : True disabled : True
@ -333,7 +333,7 @@ engines:
title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a'
url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href'
content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]'
thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]/img/@data-src' thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src'
categories : videos categories : videos
shortcut : gpm shortcut : gpm
disabled : True disabled : True
@ -345,7 +345,7 @@ engines:
title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a'
url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href'
content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]'
thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]/img/@data-src' thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src'
categories : music categories : music
shortcut : gps shortcut : gps
disabled : True disabled : True