Varios 1
allpeliculas: Cambio de dominio puyasubs: torrents agregados a findvideos repelis: updated yape: nuevo canal rapidvideo: updated pattern
This commit is contained in:
@@ -33,15 +33,13 @@ SERVERS = {"26": "powvideo", "45": "okru", "75": "openload", "12": "netutv", "65
|
||||
list_servers = ['powvideo', 'okru', 'openload', 'netutv', 'thevideos', 'spruto', 'stormo', 'idowatch', 'nowvideo',
|
||||
'fastplay', 'raptu', 'tusfiles']
|
||||
|
||||
host = "http://allpeliculas.com/"
|
||||
host = "http://allpeliculas.io/"
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item.text_color = color1
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist.append(item.clone(title="Películas", action="lista", fanart="http://i.imgur.com/c3HS8kj.png",
|
||||
url= host + "movies/newmovies?page=1", extra1 = 0,
|
||||
thumbnail=get_thumb('movies', auto=True)))
|
||||
@@ -51,16 +49,13 @@ def mainlist(item):
|
||||
url= host, thumbnail=get_thumb('colections', auto=True)))
|
||||
itemlist.append(item.clone(title="", action=""))
|
||||
itemlist.append(item.clone(title="Buscar...", action="search", thumbnail=get_thumb('search', auto=True)))
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def colecciones(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'href="(/peliculas[^"]+).*?'
|
||||
patron += 'title_geo"><span>([^<]+).*?'
|
||||
@@ -143,11 +138,11 @@ def findvideos(item):
|
||||
patron += '>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, calidad in matches:
|
||||
calidad = scrapertools.find_single_match(calidad, "\d+") + scrapertools.find_single_match(calidad, "\..+")
|
||||
itemlist.append(item.clone(
|
||||
channel = item.channel,
|
||||
action = "play",
|
||||
title = calidad,
|
||||
fulltitle = item.title,
|
||||
thumbnail = item.thumbnail,
|
||||
contentThumbnail = item.thumbnail,
|
||||
url = url,
|
||||
@@ -159,7 +154,7 @@ def findvideos(item):
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
fulltitle = item.fulltitle
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
# Requerido para FilterTools
|
||||
|
||||
@@ -183,31 +178,22 @@ def lista(item):
|
||||
dict_param = dict()
|
||||
item.infoLabels = {}
|
||||
item.text_color = color2
|
||||
|
||||
params = '{}'
|
||||
if item.extra1 != 0:
|
||||
dict_param["genero"] = [item.extra1]
|
||||
params = jsontools.dump(dict_param)
|
||||
|
||||
data = httptools.downloadpage(item.url, post=params).data
|
||||
data = data.replace("<mark>","").replace("<\/mark>","")
|
||||
dict_data = jsontools.load(data)
|
||||
|
||||
for it in dict_data["items"]:
|
||||
title = it["title"]
|
||||
plot = it["slogan"]
|
||||
rating = it["imdb"]
|
||||
year = it["year"]
|
||||
url = host + "pelicula/" + it["slug"]
|
||||
title = it["title"] + " (%s)" %year
|
||||
thumb = host + it["image"]
|
||||
item.infoLabels['year'] = year
|
||||
itemlist.append(item.clone(action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumb,
|
||||
plot=plot, context=["buscar_trailer"], contentTitle=title, contentType="movie"))
|
||||
|
||||
try:
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
except:
|
||||
pass
|
||||
itemlist.append(item.clone(action="findvideos", title=title, url=url, thumbnail=thumb,
|
||||
context=["buscar_trailer"], contentTitle=it["title"], contentType="movie"))
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
pagina = scrapertools.find_single_match(item.url, 'page=([0-9]+)')
|
||||
item.url = item.url.replace(pagina, "")
|
||||
if pagina == "":
|
||||
@@ -219,6 +205,7 @@ def lista(item):
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
if texto != "":
|
||||
@@ -246,12 +233,10 @@ def newest(categoria):
|
||||
|
||||
if itemlist[-1].action == "lista":
|
||||
itemlist.pop()
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -5,8 +5,10 @@ import re
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from megaserver import Client
|
||||
from platformcode import config, logger, platformtools
|
||||
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', 'puyasubs')
|
||||
__perfil__ = config.get_setting('perfil', "puyasubs")
|
||||
@@ -20,39 +22,36 @@ if __perfil__ < 3:
|
||||
else:
|
||||
color1 = color2 = color3 = color4 = color5 = ""
|
||||
|
||||
host = "http://puya.si"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title="Novedades Anime", thumbnail=item.thumbnail,
|
||||
url="http://puya.si/?cat=4", text_color=color1))
|
||||
url= host + "/?cat=4", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="listado", title="Novedades Doramas", thumbnail=item.thumbnail,
|
||||
url="http://puya.si/?cat=142", text_color=color1))
|
||||
url= host + "/?cat=142", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="", title="Descargas", text_color=color2))
|
||||
itemlist.append(Item(channel=item.channel, action="descargas", title=" Descargas Animes y Doramas en proceso",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?page_id=25501", text_color=color1))
|
||||
thumbnail=item.thumbnail, url= host + "/?page_id=25501", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="descargas", title=" Descargas Animes Finalizados",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?page_id=15388", text_color=color1))
|
||||
thumbnail=item.thumbnail, url= host + "/?page_id=15388", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="letra", title=" Descargas Animes Finalizados por Letra",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?page_id=15388", text_color=color1))
|
||||
thumbnail=item.thumbnail, url= host + "/?page_id=15388", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="descargas", title=" Descargas Doramas Finalizados",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?page_id=25507", text_color=color1))
|
||||
thumbnail=item.thumbnail, url= host + "/?page_id=25507", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="descargas", title=" Descargas Películas y Ovas",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?page_id=25503", text_color=color1))
|
||||
thumbnail=item.thumbnail, url= host + "/?page_id=25503", text_color=color1))
|
||||
itemlist.append(Item(channel=item.channel, action="torrents", title="Lista de Torrents", thumbnail=item.thumbnail,
|
||||
url="https://www.frozen-layer.com/buscar/descargas", text_color=color1))
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar anime/dorama/película",
|
||||
thumbnail=item.thumbnail, url="http://puya.si/?s=", text_color=color3))
|
||||
|
||||
thumbnail=item.thumbnail, url= host + "/?s=", text_color=color3))
|
||||
itemlist.append(item.clone(title="Configurar canal", action="configuracion", text_color=color5, folder=False))
|
||||
return itemlist
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
from platformcode import platformtools
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
@@ -73,9 +72,7 @@ def search(item, texto):
|
||||
|
||||
def listado(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
bloques = scrapertools.find_multiple_matches(data, '<h2 class="entry-title">(.*?)</article>')
|
||||
patron = 'href="([^"]+)".*?>(.*?)</a>.*?(?:<span class="bl_categ">(.*?)|</span>)</footer>'
|
||||
@@ -96,27 +93,22 @@ def listado(item):
|
||||
itemlist.append(Item(channel=item.channel, action="findvideos", url=url, title=title, thumbnail=thumb,
|
||||
contentTitle=contenttitle, show=contenttitle, contentType=tipo,
|
||||
infoLabels={'filtro': filtro_tmdb}, text_color=color1))
|
||||
|
||||
if ("cat=4" in item.url or item.extra == "busqueda") and not item.extra == "novedades":
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
next_page = scrapertools.find_single_match(data, "<span class='current'>.*?<a href='([^']+)'")
|
||||
if next_page:
|
||||
next_page = next_page.replace("&", "&")
|
||||
itemlist.append(Item(channel=item.channel, action="listado", url=next_page, title=">> Página Siguiente",
|
||||
thumbnail=item.thumbnail, extra=item.extra, text_color=color2))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def descargas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
if not item.pagina:
|
||||
item.pagina = 0
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<li><a href="(http://puya.si/\?page_id=\d+|http://safelinking.net/[0-9A-z]+)">(.*?)</a>'
|
||||
if item.letra:
|
||||
@@ -130,32 +122,25 @@ def descargas(item):
|
||||
.replace("[Puya+] ", "")
|
||||
contenttitle = re.sub(r'(\[[^\]]*\])', '', contenttitle).strip()
|
||||
filtro_tmdb = {"original_language": "ja"}.items()
|
||||
|
||||
tipo = "tvshow"
|
||||
if "page_id=25503" in item.url:
|
||||
tipo = "movie"
|
||||
|
||||
action = "findvideos"
|
||||
if "safelinking" in url:
|
||||
action = "extract_safe"
|
||||
itemlist.append(Item(channel=item.channel, action=action, url=url, title=title, contentTitle=contenttitle,
|
||||
show=contenttitle, contentType=tipo, infoLabels={'filtro': filtro_tmdb},
|
||||
text_color=color1))
|
||||
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
if len(matches) > item.pagina + 20:
|
||||
pagina = item.pagina + 20
|
||||
itemlist.append(Item(channel=item.channel, action="descargas", url=item.url, title=">> Página Siguiente",
|
||||
thumbnail=item.thumbnail, pagina=pagina, letra=item.letra, text_color=color2))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def letra(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<li>(?:<strong>|)([A-z#]{1})(?:</strong>|)</li>'
|
||||
@@ -163,20 +148,16 @@ def letra(item):
|
||||
for match in matches:
|
||||
itemlist.append(Item(channel=item.channel, title=match, action="descargas", letra=match, url=item.url,
|
||||
thumbnail=item.thumbnail, text_color=color1))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def torrents(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = list()
|
||||
if not item.pagina:
|
||||
item.pagina = 0
|
||||
|
||||
post = "utf8=%E2%9C%93&busqueda=puyasubs&search=Buscar&tab=anime&con_seeds=con_seeds"
|
||||
data = httptools.downloadpage(item.url, post).data
|
||||
|
||||
patron = "<td>.*?href='([^']+)' title='descargar torrent'>.*?title='informacion de (.*?)'.*?<td class='fecha'>.*?<td>(.*?)</td>" \
|
||||
".*?<span class=\"stats\d+\">(\d+)</span>.*?<span class=\"stats\d+\">(\d+)</span>"
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
@@ -184,20 +165,15 @@ def torrents(item):
|
||||
contentTitle = title
|
||||
if "(" in contentTitle:
|
||||
contentTitle = contentTitle.split("(")[0]
|
||||
|
||||
size = size.strip()
|
||||
filtro_tmdb = {"original_language": "ja"}.items()
|
||||
title += " [COLOR %s][Semillas:%s[/COLOR]|[COLOR %s]Leech:%s[/COLOR]|%s]" % (
|
||||
color4, seeds, color5, leechers, size)
|
||||
url = "https://www.frozen-layer.com" + url
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action="play", url=url, title=title, contentTitle=contentTitle,
|
||||
server="torrent", show=contentTitle, contentType="tvshow", text_color=color1,
|
||||
infoLabels={'filtro': filtro_tmdb}))
|
||||
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||
|
||||
if len(matches) > item.pagina + 25:
|
||||
pagina = item.pagina + 25
|
||||
itemlist.append(Item(channel=item.channel, action="torrents", url=item.url, title=">> Página Siguiente",
|
||||
@@ -208,43 +184,39 @@ def torrents(item):
|
||||
next_page = "https://www.frozen-layer.com" + next_page
|
||||
itemlist.append(Item(channel=item.channel, action="torrents", url=next_page, title=">> Página Siguiente",
|
||||
thumbnail=item.thumbnail, pagina=0, text_color=color2))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
if item.infoLabels["tmdb_id"] and not item.infoLabels["plot"]:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_item(item, True, idioma_busqueda="en")
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data2 = data.replace("\n","")
|
||||
idiomas = scrapertools.find_single_match(data, 'Subtitulo:\s*(.*?)<br />')
|
||||
calidades = ['720p', '1080p']
|
||||
torrentes = scrapertools.find_multiple_matches(data, '<a href="(https://www.frozen-layer.com/descargas[^"]+)"')
|
||||
calidades = ['1080p', '720p']
|
||||
torrentes = scrapertools.find_multiple_matches(data, '<a href="((?:https://www.frozen-layer.com/descargas[^"]+|https://nyaa.si/view/[^"]+))"')
|
||||
if torrentes:
|
||||
for i, enlace in enumerate(torrentes):
|
||||
title = "Ver por Torrent %s" % idiomas
|
||||
if ">720p" in data and ">1080p" in data:
|
||||
try:
|
||||
title = "[%s] %s" % (calidades[i], title)
|
||||
except:
|
||||
pass
|
||||
itemlist.append(item.clone(title=title, action="play", url=enlace, server="torrent"))
|
||||
|
||||
if ">720p" in data2 and ">1080p" in data2:
|
||||
title = "[%s] %s" % (calidades[i], title)
|
||||
if "nyaa" in enlace:
|
||||
data1 = httptools.downloadpage(url=enlace).data
|
||||
enlace = "https://nyaa.si" + scrapertools.find_single_match(data1, 'a href="(/do[^"]+)')
|
||||
itemlist.append(item.clone(title=title, action="play", url=enlace, server="torrent"))
|
||||
enlace = scrapertools.find_single_match(data1, '<a href="(magnet[^"]+)')
|
||||
itemlist.append(item.clone(title=title, action="play", url=enlace, server="torrent"))
|
||||
#itemlist.append(item.clone(title=title, action="play", url=enlace, server="torrent"))
|
||||
onefichier = scrapertools.find_multiple_matches(data, '<a href="(https://1fichier.com/[^"]+)"')
|
||||
if onefichier:
|
||||
for i, enlace in enumerate(onefichier):
|
||||
title = "Ver por 1fichier %s" % idiomas
|
||||
if ">720p" in data and ">1080p" in data:
|
||||
if ">720p" in data and ">1080p" in data2:
|
||||
try:
|
||||
title = "[%s] %s" % (calidades[i], title)
|
||||
except:
|
||||
pass
|
||||
itemlist.append(item.clone(title=title, action="play", url=enlace, server="onefichier"))
|
||||
|
||||
safelink = scrapertools.find_multiple_matches(data, '<a href="(http(?:s|)://safelinking.net/[^"]+)"')
|
||||
if safelink:
|
||||
for i, safe in enumerate(safelink):
|
||||
@@ -276,17 +248,14 @@ def findvideos(item):
|
||||
except:
|
||||
pass
|
||||
itemlist.append(item.clone(title=title, action=action, url=enlace, server=server))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def carpeta(item):
|
||||
logger.info()
|
||||
itemlist = list()
|
||||
|
||||
if item.server == "onefichier":
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = '<tr>.*?<a href="([^"]+)".*?>(.*?)</a>.*?<td class="normal">(.*?)</td>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, size in matches:
|
||||
@@ -295,11 +264,7 @@ def carpeta(item):
|
||||
server="onefichier", text_color=color1, thumbnail=item.thumbnail,
|
||||
infoLabels=item.infoLabels))
|
||||
else:
|
||||
from megaserver import Client
|
||||
from platformcode import platformtools
|
||||
|
||||
c = Client(url=item.url)
|
||||
|
||||
files = c.get_files()
|
||||
c.stop()
|
||||
for enlace in files:
|
||||
@@ -308,7 +273,6 @@ def carpeta(item):
|
||||
Item(channel=item.channel, title=enlace["name"], url=item.url + "|" + file_id, action="play",
|
||||
server="mega", text_color=color1, thumbnail=item.thumbnail,
|
||||
infoLabels=item.infoLabels))
|
||||
|
||||
itemlist.sort(key=lambda item: item.title)
|
||||
return itemlist
|
||||
|
||||
@@ -316,16 +280,13 @@ def carpeta(item):
|
||||
def extract_safe(item):
|
||||
logger.info()
|
||||
if item.infoLabels["tmdb_id"] and not item.infoLabels["plot"]:
|
||||
from core import tmdb
|
||||
tmdb.set_infoLabels_item(item, True, idioma_busqueda="en")
|
||||
itemlist = list()
|
||||
|
||||
hash = item.url.rsplit("/", 1)[1]
|
||||
headers = [['Content-Type', 'application/json;charset=utf-8']]
|
||||
post = jsontools.dump({"hash": hash})
|
||||
data = httptools.downloadpage("http://safelinking.net/v1/protected", post, headers).data
|
||||
data = jsontools.load(data)
|
||||
|
||||
for link in data.get("links"):
|
||||
enlace = link["url"]
|
||||
domain = link["domain"]
|
||||
@@ -335,29 +296,11 @@ def extract_safe(item):
|
||||
server = "mega"
|
||||
if "/#F!" in enlace:
|
||||
action = "carpeta"
|
||||
|
||||
elif "1fichier" in domain:
|
||||
server = "onefichier"
|
||||
if "/dir/" in enlace:
|
||||
action = "carpeta"
|
||||
|
||||
itemlist.append(item.clone(title=title, action=action, url=enlace, server=server))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info()
|
||||
itemlist = list()
|
||||
|
||||
if item.server == "torrent" and "frozen" in item.url and not item.url.endswith(".torrent"):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
enlace = scrapertools.find_single_match(data, "<div id='descargar_torrent'>.*?href='([^']+)'")
|
||||
if enlace:
|
||||
itemlist.append(item.clone(url=enlace))
|
||||
else:
|
||||
itemlist.append(item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -365,7 +308,7 @@ def newest(categoria):
|
||||
logger.info()
|
||||
item = Item()
|
||||
try:
|
||||
item.url = "http://puya.si/?cat=4"
|
||||
item.url = host + "/?cat=4"
|
||||
item.extra = "novedades"
|
||||
itemlist = listado(item)
|
||||
|
||||
@@ -373,12 +316,10 @@ def newest(categoria):
|
||||
itemlist.pop()
|
||||
for it in itemlist:
|
||||
it.contentTitle = it.title
|
||||
|
||||
# Se captura la excepción, para no interrumpir al canal novedades si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -9,11 +9,11 @@ from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from lib import jsunpack
|
||||
from platformcode import config, logger, platformtools
|
||||
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
{
|
||||
"id": "seriecanal",
|
||||
"name": "Seriecanal",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://i.imgur.com/EwMK8Yd.png",
|
||||
"banner": "seriecanal.png",
|
||||
"categories": [
|
||||
"tvshow",
|
||||
"vos"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "user",
|
||||
"type": "text",
|
||||
"label": "Usuario",
|
||||
"color": "0xFFd50b0b",
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "password",
|
||||
"type": "text",
|
||||
"label": "Contraseña",
|
||||
"color": "0xFFd50b0b",
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"type": "list",
|
||||
"label": "Perfil de color",
|
||||
"default": 2,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Perfil 3",
|
||||
"Perfil 2",
|
||||
"Perfil 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
76
plugin.video.alfa/channels/yape.json
Normal file
76
plugin.video.alfa/channels/yape.json
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"id": "yape",
|
||||
"name": "Yape",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat","cast","vose"],
|
||||
"thumbnail": "https://s8.postimg.cc/71ed4op5d/yape1.png",
|
||||
"banner": "https://s8.postimg.cc/4wu03lfsx/yape2.png",
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostrar enlaces en idioma...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"No filtrar",
|
||||
"LAT",
|
||||
"ESP",
|
||||
"VOSE"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "modo_grafico",
|
||||
"type": "bool",
|
||||
"label": "Buscar información extra",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_latino",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Latino",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Peliculas",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_infantiles",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - Infantiles",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_terror",
|
||||
"type": "bool",
|
||||
"label": "Incluir en Novedades - terror",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
193
plugin.video.alfa/channels/yape.py
Normal file
193
plugin.video.alfa/channels/yape.py
Normal file
@@ -0,0 +1,193 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Channel Yape -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
from channelselector import get_thumb
|
||||
from channels import autoplay
|
||||
from channels import filtertools
|
||||
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, platformtools
|
||||
|
||||
|
||||
idio = {'https://cdn.yape.nu//languajes/la.png': 'LAT','https://cdn.yape.nu//languajes/es.png': 'ESP','https://cdn.yape.nu//languajes/en_es.png': 'VOSE'}
|
||||
cali = {'HD 1080p': 'HD 1080p','TS Screener HQ':'TS Screener HQ', 'BR Screnner':'BR Screnner','HD Rip':'HD Rip','DVD Screnner':'DVD Screnner'}
|
||||
|
||||
list_language = idio.values()
|
||||
list_quality = cali.values()
|
||||
list_servers = ['streamango', 'powvideo', 'openload', 'streamplay', 'vidoza', 'clipwaching']
|
||||
|
||||
|
||||
__channel__='yape'
|
||||
|
||||
host = "https://yape.nu"
|
||||
|
||||
try:
|
||||
__modo_grafico__ = config.get_setting('modo_grafico', __channel__)
|
||||
except:
|
||||
__modo_grafico__ = True
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
itemlist = []
|
||||
itemlist.append(Item(channel = item.channel, title = "Actualizadas", action = "peliculas", url = host + "/catalogue?sort=time_update&page=", page=1, thumbnail = get_thumb("updated", auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, title = "Mas vistas", action = "peliculas", url = host + "/catalogue?sort=mosts-today&page=", page=1, thumbnail = get_thumb("more watched", auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, title = "Ultimas agregadas", action = "peliculas", url = host + "/catalogue?sort=latest&page=", page=1, thumbnail = get_thumb("last", auto = True)))
|
||||
itemlist.append(Item(channel = item.channel, title = "Por género", action = "generos", url = host, extra = "Genero", thumbnail = get_thumb("genres", auto = True) ))
|
||||
itemlist.append(Item(channel = item.channel, title = ""))
|
||||
itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "/search?term=", thumbnail = get_thumb("search", auto = True)))
|
||||
itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False))
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def configuracion(item):
|
||||
ret = platformtools.show_channel_settings()
|
||||
platformtools.itemlist_refresh()
|
||||
return ret
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info()
|
||||
item.url = host + "/search?s=%s&page=" %texto
|
||||
item.extra = "busca"
|
||||
item.page = 1
|
||||
if texto != '':
|
||||
return peliculas(item)
|
||||
else:
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
url = item.url + str(item.page)
|
||||
data = httptools.downloadpage(url).data
|
||||
patron = 'class="col-lg-2 col-md-3 col-6 mb-3">.*?href="([^"]+).*?'
|
||||
patron += 'title="([^"]+).*?'
|
||||
patron += 'src="([^"]+).*?'
|
||||
patron += 'txt-size-13">([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedyear in matches:
|
||||
scrapedtitle = scrapedtitle.replace("Ver ","").replace(" Completa Online Gratis","")
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
action = "findvideos",
|
||||
contentTitle = scrapedtitle,
|
||||
infoLabels = {'year':scrapedyear},
|
||||
thumbnail = scrapedthumbnail,
|
||||
title = scrapedtitle + " (%s)" %scrapedyear,
|
||||
url = scrapedurl
|
||||
))
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
#pagination
|
||||
if len(itemlist)>0:
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
action = "peliculas",
|
||||
page = item.page + 1,
|
||||
title = "Página siguiente >>",
|
||||
url = item.url
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria in ['peliculas','latino']:
|
||||
item.url = host + "/catalogue?sort=latest?page="
|
||||
item.page=1
|
||||
elif categoria == 'infantiles':
|
||||
item.url = host + '/genre/animacion?page'
|
||||
item.page = 1
|
||||
elif categoria == 'terror':
|
||||
item.url = host + 'genre/terror?page='
|
||||
item.page = 1
|
||||
itemlist = peliculas(item)
|
||||
if "Pagina" in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def generos(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = 'dropdown-item py-1 px-2" href="([^"]+)"'
|
||||
patron += '>([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url, titulo in matches:
|
||||
itemlist.append(Item(channel = item.channel,
|
||||
action = "peliculas",
|
||||
title = titulo,
|
||||
url = url + "?page=",
|
||||
page = 1
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
bloque = scrapertools.find_single_match(data, 'Descargar</span>(.*?)Te recomendamos')
|
||||
if bloque == "[]":
|
||||
return []
|
||||
patron = 'sv_([^_]+).*?'
|
||||
patron += 'link="([^"]+).*?'
|
||||
patron += 'juM9Fbab.*?src="([^"]+).*?'
|
||||
patron += 'rounded c.">([^<]+)'
|
||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||
for scrapedserver, scrapedurl, scrapedlanguage, scrapedquality in matches:
|
||||
titulo = "Ver en: " + scrapedserver.capitalize() + " (%s)(%s)" %(cali[scrapedquality], idio[scrapedlanguage])
|
||||
itemlist.append(
|
||||
item.clone(action = "play",
|
||||
language = idio[scrapedlanguage],
|
||||
quality = cali[scrapedquality],
|
||||
title = titulo,
|
||||
url = scrapedurl
|
||||
))
|
||||
itemlist.sort(key=lambda it: (it.language, it.server))
|
||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if itemlist:
|
||||
itemlist.append(Item(channel = item.channel))
|
||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||
text_color="magenta"))
|
||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||
if item.extra != "library":
|
||||
if config.get_videolibrary_support():
|
||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||
contentTitle = item.contentTitle
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
url = scrapertools.find_single_match(data, 'iframe class="" src="([^"]+)')
|
||||
item.url = url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||
itemlist.append(item.clone())
|
||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||
itemlist[0].thumbnail = item.contentThumbnail
|
||||
return itemlist
|
||||
@@ -134,13 +134,13 @@ def open_settings():
|
||||
if settings_post['adult_aux_new_password1'] == settings_post['adult_aux_new_password2']:
|
||||
set_setting('adult_password', settings_post['adult_aux_new_password1'])
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(60305),
|
||||
config.get_localized_string(60306),
|
||||
config.get_localized_string(60307))
|
||||
platformtools.dialog_ok(get_localized_string(60305),
|
||||
get_localized_string(60306),
|
||||
get_localized_string(60307))
|
||||
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(60305), config.get_localized_string(60309),
|
||||
config.get_localized_string(60310))
|
||||
platformtools.dialog_ok(get_localized_string(60305), get_localized_string(60309),
|
||||
get_localized_string(60310))
|
||||
|
||||
# Deshacer cambios
|
||||
set_setting("adult_mode", settings_pre.get("adult_mode", 0))
|
||||
@@ -195,23 +195,23 @@ def get_setting(name, channel="", server="", default=None):
|
||||
|
||||
# Specific channel setting
|
||||
if channel:
|
||||
# logger.info("config.get_setting reading channel setting '"+name+"' from channel json")
|
||||
# logger.info("get_setting reading channel setting '"+name+"' from channel json")
|
||||
from core import channeltools
|
||||
value = channeltools.get_channel_setting(name, channel, default)
|
||||
# logger.info("config.get_setting -> '"+repr(value)+"'")
|
||||
# logger.info("get_setting -> '"+repr(value)+"'")
|
||||
return value
|
||||
|
||||
# Specific server setting
|
||||
elif server:
|
||||
# logger.info("config.get_setting reading server setting '"+name+"' from server json")
|
||||
# logger.info("get_setting reading server setting '"+name+"' from server json")
|
||||
from core import servertools
|
||||
value = servertools.get_server_setting(name, server, default)
|
||||
# logger.info("config.get_setting -> '"+repr(value)+"'")
|
||||
# logger.info("get_setting -> '"+repr(value)+"'")
|
||||
return value
|
||||
|
||||
# Global setting
|
||||
else:
|
||||
# logger.info("config.get_setting reading main setting '"+name+"'")
|
||||
# logger.info("get_setting reading main setting '"+name+"'")
|
||||
value = __settings__.getSetting(name)
|
||||
if not value:
|
||||
return default
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/|v/)([A-z0-9]+)",
|
||||
"pattern": "rapidvideo.(?:org|com)/(?:\\?v=|e/|embed/|v/|)([A-z0-9]+)",
|
||||
"url": "https://www.rapidvideo.com/e/\\1"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user