diff --git a/plugin.video.alfa/channels/pelisfox.py b/plugin.video.alfa/channels/pelisfox.py index 294eea6b..10e6e913 100644 --- a/plugin.video.alfa/channels/pelisfox.py +++ b/plugin.video.alfa/channels/pelisfox.py @@ -74,16 +74,15 @@ def lista(item): itemlist = [] data = httptools.downloadpage(item.url).data - data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data) + data = re.sub(r'\n|\r|\t| |
|\s{2,}', "", data) if item.seccion != 'actor': - patron = '
  • (.*?)<\/a>') + actual_page = scrapertools.find_single_match(data, '(.*?)<\/a>') if actual_page: next_page_num = int(actual_page) + 1 next_page = scrapertools.find_single_match(data, - '
  • Siguiente') + '
  • Siguiente') next_page_url = host + next_page + '?page=%s' % next_page_num if next_page != '': itemlist.append(Item(channel=item.channel, @@ -129,15 +128,14 @@ def seccion(item): logger.info() itemlist = [] data = httptools.downloadpage(item.url).data - data = re.sub(r'"|\n|\r|\t| |
    |\s{2,}', "", data) + data = re.sub(r'\n|\r|\t| |
    |\s{2,}', "", data) if item.seccion == 'generos': - patron = '
    (.*?)<\/a>' + patron = '(\d{4})<\/a> <\/li>' elif item.seccion == 'actor': - patron = '
  • <\/div><\/figure>' - matches = re.compile(patron, re.DOTALL).findall(data) - + patron = '
  • .*?data-src="([^"]+)' + matches = scrapertools.find_multiple_matches(data, patron) if item.seccion != 'actor': for scrapedurl, scrapedtitle in matches: title = scrapedtitle.decode('utf-8') @@ -158,7 +156,6 @@ def seccion(item): )) else: for scrapedurl, scrapedname, scrapedthumbnail in matches: - thumbnail = scrapedthumbnail fanart = '' title = scrapedname url = host + scrapedurl @@ -168,14 +165,14 @@ def seccion(item): title=title, fulltitle=item.title, url=url, - thumbnail=thumbnail, + thumbnail=scrapedthumbnail, fanart=fanart, seccion=item.seccion )) # Paginacion if itemlist != []: - next_page = scrapertools.find_single_match(data, '
  • Siguiente <') + next_page = scrapertools.find_single_match(data, '
  • 0 and item.extra != 'findvideos': video_list.append( Item(channel=item.channel, @@ -308,3 +304,8 @@ def newest(categoria): return [] return itemlist + + +def play(item): + item.thumbnail = item.contentThumbnail + return [item]