From 0ec7b3c10fa7ecc14627c3e3564cb9f0515e465b Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Fri, 6 Oct 2017 10:42:05 -0500 Subject: [PATCH] Update peliscity.py --- plugin.video.alfa/channels/peliscity.py | 35 +++++++++++-------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index 78a924df..fa64ef07 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -5,6 +5,7 @@ import re from core import httptools from core import scrapertools from core import servertools +from core import tmdb from core.item import Item from platformcode import config, logger @@ -58,7 +59,7 @@ def porGenero(item): patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)' - matches = re.compile(patron, re.DOTALL).findall(data) + matches = scrapertools.find_multiple_matches(data, patron) for urlgen, genero, cantidad in matches: cantidad = cantidad.replace(".", "") @@ -103,7 +104,6 @@ def agregadas(item): title = info[3] plot = info[4] year = info[5].strip() - itemlist.append(Item(channel=item.channel, action='findvideos', contentType = "movie", @@ -116,15 +116,11 @@ def agregadas(item): contentTitle = title, url=url )) - # Paginación - try: - next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) >.*?href=(.*?) > (.*?)

' - matches = re.compile(patron, re.DOTALL).findall(data) + matches = scrapertools.find_multiple_matches(data, patron) for url, thumbnail, title, sinopsis in matches: itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url, @@ -157,7 +151,7 @@ def findvideos(item): # Descarga la pagina data = httptools.downloadpage(item.url).data patron = 'cursor: hand" rel="(.*?)".*?class="optxt">(.*?)<.*?width.*?class="q">(.*?)