(.*?)<')
- for url, thumb, title, year in patron:
+ for thumb, url, title, year in patron:
titulo = title.strip()
title = re.sub(r"\d+x.*", "", title)
new_item = item.clone(action="findtemporadas", title="[COLOR aqua]" + titulo + "[/COLOR]", url=url,
thumbnail=thumb, fulltitle=title, contentTitle=title, show=title,
- contentType="tvshow", library=True)
- new_item.infoLabels['year'] = year
+ contentType="tvshow", library=True, infoLabels={'year':year})
itemlist.append(new_item)
## Paginación
@@ -282,7 +281,6 @@ def findtemporadas(item):
check_temp = "yes"
data = httptools.downloadpage(item.url).data
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
-
if len(item.extra.split("|")):
if len(item.extra.split("|")) >= 4:
fanart = item.extra.split("|")[2]
@@ -423,6 +421,7 @@ def findvideos(item):
new_item.infoLabels['episode'] = item.epi
new_item.infoLabels['season'] = item.temp
itemlist.append(new_item)
+ itemlist = servertools.get_servers_itemlist(itemlist)
else:
title = "[COLOR darkcyan][B]Ver capítulo [/B][/COLOR]" + "[COLOR red][B]" + capitulo + "[/B][/COLOR]" + " " + "[COLOR darkred]" + server + " ( " + idioma + " )" + "[/COLOR]"
itemlist.append(Item(channel=item.channel, title=title, url=url, action="play", fanart=fanart,
diff --git a/plugin.video.alfa/channels/pelisgratis.py b/plugin.video.alfa/channels/pelisgratis.py
index f53df573..c415d561 100755
--- a/plugin.video.alfa/channels/pelisgratis.py
+++ b/plugin.video.alfa/channels/pelisgratis.py
@@ -6,6 +6,7 @@ from core import httptools
from core import scrapertools
from core import servertools
from core import tmdb
+from core import jsontools
from core.item import Item
from platformcode import config, logger
@@ -217,56 +218,29 @@ def findvideos(item):
duplicados = []
data = get_source(item.url)
- data = data.replace('amp;', '')
- data_page = data
-
- patron = 'class=TPlayerTb id=(.*?)><iframe width="560" height="315" src="(.*?)"'
+ patron = '.*?(.*?)<\/center>' % option)
- if language == 'Castellano':
- language = 'Español'
- if language in audio:
- id_audio = audio[language]
- else:
- id_audio = language
- if 'redirect' in video_page or 'yourplayer' in video_page:
- data = get_source('http:%s' % video_page)
-
- patron = 'label:(.*?),.*?file:(.*?)&app.*?}'
- matches = re.compile(patron, re.DOTALL).findall(data)
- for video_url in matches:
-
- url = video_url[1]
- url = url.replace('\/', '/')
- title = item.contentTitle + ' [%s][%s]' % (video_url[0], id_audio)
- server = 'directo'
- if url not in duplicados:
- itemlist.append(item.clone(action='play',
- title=title,
- url=url,
- server=server
- ))
- duplicados.append(url)
- else:
- if video_page not in duplicados:
- itemlist.extend(servertools.find_video_items(data=video_page))
- duplicados.append(video_page)
-
- for video_item in itemlist:
- if video_item.server != 'directo':
- video_item.channel = item.channel
- video_item.quality = item.quality
- video_item.title = item.contentTitle + ' [%s][%s]' % (video_item.server, id_audio)
-
- if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
- itemlist.append(item.clone(title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
- url=item.url,
- action="add_pelicula_to_library",
- extra="findvideos",
- contentTitle=item.contentTitle
- ))
+ for opt, urls_page in matches:
+ language = scrapertools.find_single_match (data,'data-TPlayerNv=%s>Opción .*?'
+ '<\/strong><\/span>.*?(.*?)<\/span'%opt)
+ data = httptools.downloadpage(urls_page).data
+ servers = scrapertools.find_multiple_matches(data,'