From 555d57b7b71ccee508ee5061a8fbba958a67fce2 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 12 Oct 2017 11:50:03 -0500 Subject: [PATCH] Update peliscity.py --- plugin.video.alfa/channels/peliscity.py | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/plugin.video.alfa/channels/peliscity.py b/plugin.video.alfa/channels/peliscity.py index fa64ef07..121f34f4 100755 --- a/plugin.video.alfa/channels/peliscity.py +++ b/plugin.video.alfa/channels/peliscity.py @@ -32,8 +32,8 @@ def mainlist(item): url= host + "/calidad/hd-real-720", viewmode="movie_with_plot")) itemlist.append( Item(channel=item.channel, title=" Listado por género", action="porGenero", url= host)) - itemlist.append(Item(channel=item.channel, title=" Buscar", action="search", url= host + "/?s=")) itemlist.append(Item(channel=item.channel, title=" Idioma", action="porIdioma", url= host)) + itemlist.append(Item(channel=item.channel, title=" Buscar", action="search", url= host + "/?s=")) return itemlist @@ -53,14 +53,10 @@ def porIdioma(item): def porGenero(item): logger.info() - itemlist = [] data = httptools.downloadpage(item.url).data - patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)' - matches = scrapertools.find_multiple_matches(data, patron) - for urlgen, genero, cantidad in matches: cantidad = cantidad.replace(".", "") titulo = genero + " (" + cantidad + ")" @@ -74,10 +70,9 @@ def search(item, texto): logger.info() texto_post = texto.replace(" ", "+") item.url = host + "/?s=" + texto_post - try: return listaBuscar(item) - # Se captura la excepci?n, para no interrumpir al buscador global si un canal falla + # Se captura la excepcion, para no interrumpir al buscador global si un canal falla except: import sys for line in sys.exc_info(): @@ -88,12 +83,9 @@ def search(item, texto): def agregadas(item): logger.info() itemlist = [] - data = httptools.downloadpage(item.url).data data = re.sub(r'\n|\r|\t|\s{2}| |"', "", data) - patron = scrapertools.find_multiple_matches (data,'.*?Duración') - for element in patron: info = scrapertools.find_single_match(element, "calidad>(.*?)<.*?ahref=(.*?)>.*?'reflectMe' src=(.*?)\/>.*?

(.*?)" @@ -107,16 +99,15 @@ def agregadas(item): itemlist.append(Item(channel=item.channel, action='findvideos', contentType = "movie", + contentTitle = title, fulltitle = title, infoLabels={'year':year}, - plot=plot, quality=quality, thumbnail=thumbnail, title=title, - contentTitle = title, url=url )) - tmdb.set_infoLabels_itemlist(itemlist, True) + tmdb.set_infoLabels(itemlist, True) next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) >