From 48a8f2fa1ae03cb74feed3ab096a52fe2768e321 Mon Sep 17 00:00:00 2001 From: Intel1 <25161862+Intel11@users.noreply.github.com> Date: Thu, 30 Nov 2017 17:02:54 -0500 Subject: [PATCH] pelisplus: fix buscador global series --- plugin.video.alfa/channels/pelisplus.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/plugin.video.alfa/channels/pelisplus.py b/plugin.video.alfa/channels/pelisplus.py index 93dd1fa9..23a950b9 100644 --- a/plugin.video.alfa/channels/pelisplus.py +++ b/plugin.video.alfa/channels/pelisplus.py @@ -146,8 +146,7 @@ def search(item, texto): logger.info() texto = texto.replace(" ", "+") item.url = host + 'busqueda/?s=' + texto - if not item.extra: - item.extra = 'peliculas/' + try: if texto != '': return lista(item) @@ -174,7 +173,7 @@ def lista(item): data = httptools.downloadpage(item.url).data - if item.title != 'Buscar': + if item.action != 'search': patron = '.*?.<\/i>.*?.

.*?..*?>' actual = scrapertools.find_single_match(data, @@ -197,8 +196,8 @@ def lista(item): # de tmdb filtro_list = filtro_list.items() + if item.action != 'search': - if item.title != 'Buscar': new_item=( Item(channel=item.channel, contentType=tipo, @@ -217,6 +216,14 @@ def lista(item): new_item.contentTitle = scrapedtitle itemlist.append(new_item) else: + if item.extra=='': + item.extra = scrapertools.find_single_match(url, 'serie|pelicula')+'s/' + if 'series/' in item.extra: + accion = 'temporadas' + tipo = 'tvshow' + else: + accion = 'findvideos' + tipo = 'movie' item.extra = item.extra.rstrip('s/') if item.extra in url: new_item=( @@ -238,7 +245,7 @@ def lista(item): itemlist.append(new_item) tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - if item.title != 'Buscar' and actual != '': + if item.action != 'search' and actual != '': if itemlist != []: next_page = str(int(actual) + 1) next_page_url = item.extra + 'pag-' + next_page