From 12ffa93ae8aff393a5e47675d751bebd73bacdba Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 26 Aug 2017 15:31:03 -0300 Subject: [PATCH] Mejora de Pelis24 --- plugin.video.alfa/channels/pelis24.json | 3 +- plugin.video.alfa/channels/pelis24.py | 68 +++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/plugin.video.alfa/channels/pelis24.json b/plugin.video.alfa/channels/pelis24.json index 70bb73e0..fd53d735 100755 --- a/plugin.video.alfa/channels/pelis24.json +++ b/plugin.video.alfa/channels/pelis24.json @@ -20,7 +20,8 @@ "categories": [ "latino", "movie", - "vos" + "vos", + "direct" ], "settings": [ { diff --git a/plugin.video.alfa/channels/pelis24.py b/plugin.video.alfa/channels/pelis24.py index 15b3216a..20fb623a 100755 --- a/plugin.video.alfa/channels/pelis24.py +++ b/plugin.video.alfa/channels/pelis24.py @@ -5,8 +5,11 @@ import sys from core import httptools from core import scrapertools +from core import servertools from core.item import Item from platformcode import logger +from core import tmdb + thumbnail_host = 'https://github.com/master-1970/resources/raw/master/images/squares/pelis24.PNG' @@ -126,12 +129,12 @@ def peliculas(item): patron = '
.*?' patron += '(.*?)'%id) + server = servertools.get_server_from_url(scrapedurl) + title = '%s (%s) (%s)' % (item.title, server, lang) + thumbnail = '' + if 'enlac' in scrapedurl: + + if 'google' in scrapedurl: + server = 'gvideo' + elif 'openload' in scrapedurl: + server = 'openload' + + title = '%s (%s) (%s)'%(item.title, server, lang) + scrapedurl = scrapedurl.replace('embed','stream') + gdata = httptools.downloadpage(scrapedurl).data + url_list = servertools.findvideosbyserver(gdata, server) + for url in url_list: + if url[1] not in duplicated: + thumbnail = servertools.guess_server_thumbnail(server) + itemlist.append(item.clone(title=title, plot=url[1], url=url[1], action='play', server=server, + thumbnail = thumbnail)) + duplicated.append(url[1]) + + elif '.html' in scrapedurl: + url_list = servertools.findvideosbyserver(data, server) + for url in url_list: + if url[1] not in duplicated: + thumbnail = servertools.guess_server_thumbnail(server) + itemlist.append(item.clone(title = title, plot=url[1], url=url[1], action='play', server=server, + thumbnail = thumbnail)) + duplicated.append(url[1]) + else: + url = scrapedurl + if url not in duplicated: + thumbnail = servertools.guess_server_thumbnail(server) + itemlist.append(item.clone(title= title, plot=url, url=url, action='play', server=server, thumbnail = + thumbnail)) + duplicated.append(url) + + return itemlist + + + +