Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.alfa" name="Alfa" version="2.5.8" provider-name="Alfa Addon">
|
<addon id="plugin.video.alfa" name="Alfa" version="2.5.11" provider-name="Alfa Addon">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.libtorrent" optional="true"/>
|
<import addon="script.module.libtorrent" optional="true"/>
|
||||||
@@ -19,11 +19,16 @@
|
|||||||
</assets>
|
</assets>
|
||||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||||
» torrentrapid » torrentlocura
|
» vidlox » downace
|
||||||
» mispelisyseries » descargas2020
|
» tvvip » clipwatching
|
||||||
|
» hdfull » peliculasaudiolatino
|
||||||
|
» descargas2020 » mispelisyseries
|
||||||
|
» torrentloculra » torrentrapid
|
||||||
|
» tumejortorrent » tvsinpagar
|
||||||
|
|
||||||
¤ arreglos internos
|
¤ arreglos internos
|
||||||
|
|
||||||
¤ Gracias a la colaboración de @pipcat y @lopezvg en ésta versión
|
¤ Gracias al equipo SOD, @lopezvg, @f_y_m por colaborar en ésta versión
|
||||||
</news>
|
</news>
|
||||||
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
<description lang="es">Navega con Kodi por páginas web para ver sus videos de manera fácil.</description>
|
||||||
<summary lang="en">Browse web pages using Kodi</summary>
|
<summary lang="en">Browse web pages using Kodi</summary>
|
||||||
|
|||||||
Executable → Regular
+10
-5
@@ -213,7 +213,7 @@ def series(item):
|
|||||||
context.extend(context2)
|
context.extend(context2)
|
||||||
for show in show_list:
|
for show in show_list:
|
||||||
title, url, thumbnail, plot = show
|
title, url, thumbnail, plot = show
|
||||||
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail,
|
items.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail, contentSerieName=title,
|
||||||
plot=plot, show=title, viewmode="movies_with_plot", context=context))
|
plot=plot, show=title, viewmode="movies_with_plot", context=context))
|
||||||
|
|
||||||
url_next_page = scrapertools.find_single_match(page_html, REGEX_NEXT_PAGE)
|
url_next_page = scrapertools.find_single_match(page_html, REGEX_NEXT_PAGE)
|
||||||
@@ -237,21 +237,26 @@ def episodios(item):
|
|||||||
es_pelicula = False
|
es_pelicula = False
|
||||||
for url, title, date in episodes:
|
for url, title, date in episodes:
|
||||||
episode = scrapertools.find_single_match(title, r'Episodio (\d+)')
|
episode = scrapertools.find_single_match(title, r'Episodio (\d+)')
|
||||||
|
new_item=itemlist.append(Item(channel=item.channel, action="findvideos",
|
||||||
|
url=url, thumbnail=item.thumbnail, plot=plot, show=item.show))
|
||||||
# El enlace pertenece a un episodio
|
# El enlace pertenece a un episodio
|
||||||
if episode:
|
if episode:
|
||||||
season = 1
|
season = 1
|
||||||
episode = int(episode)
|
episode = int(episode)
|
||||||
season, episode = renumbertools.numbered_for_tratk(
|
season, episode = renumbertools.numbered_for_tratk(
|
||||||
item.channel, item.show, season, episode)
|
item.channel, item.contentSerieName, season, episode)
|
||||||
|
new_item.infoLabels["episode"] = episode
|
||||||
|
new_item.infoLabels["season"] = season
|
||||||
|
new_item.contentSerieName = item.contentSerieName
|
||||||
title = "%sx%s %s (%s)" % (season, str(episode).zfill(2), "Episodio %s" % episode, date)
|
title = "%sx%s %s (%s)" % (season, str(episode).zfill(2), "Episodio %s" % episode, date)
|
||||||
# El enlace pertenece a una pelicula
|
# El enlace pertenece a una pelicula
|
||||||
else:
|
else:
|
||||||
title = "%s (%s)" % (title, date)
|
title = "%s (%s)" % (title, date)
|
||||||
item.url = url
|
item.url = url
|
||||||
es_pelicula = True
|
es_pelicula = True
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=item.thumbnail,
|
new_item.title=title
|
||||||
plot=plot, show=item.show, fulltitle="%s %s" % (item.show, title)))
|
new_item.fulltitle="%s %s" % (item.show, title)
|
||||||
|
itemlist.append(new_item)
|
||||||
|
|
||||||
# El sistema soporta la videoteca y se encontro por lo menos un episodio
|
# El sistema soporta la videoteca y se encontro por lo menos un episodio
|
||||||
# o pelicula
|
# o pelicula
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ def start(itemlist, item):
|
|||||||
|
|
||||||
# Obtiene las listas servidores, calidades disponibles desde el nodo del json de AutoPlay
|
# Obtiene las listas servidores, calidades disponibles desde el nodo del json de AutoPlay
|
||||||
server_list = channel_node.get('servers', [])
|
server_list = channel_node.get('servers', [])
|
||||||
|
for server in server_list:
|
||||||
|
server = server.lower()
|
||||||
quality_list = channel_node.get('quality', [])
|
quality_list = channel_node.get('quality', [])
|
||||||
|
|
||||||
# Si no se definen calidades la se asigna default como calidad unica
|
# Si no se definen calidades la se asigna default como calidad unica
|
||||||
@@ -145,7 +147,7 @@ def start(itemlist, item):
|
|||||||
# Se guardan los textos de cada servidor y calidad en listas p.e. favorite_servers = ['openload',
|
# Se guardan los textos de cada servidor y calidad en listas p.e. favorite_servers = ['openload',
|
||||||
# 'streamcloud']
|
# 'streamcloud']
|
||||||
for num in range(1, 4):
|
for num in range(1, 4):
|
||||||
favorite_servers.append(channel_node['servers'][settings_node['server_%s' % num]])
|
favorite_servers.append(channel_node['servers'][settings_node['server_%s' % num]].lower())
|
||||||
favorite_quality.append(channel_node['quality'][settings_node['quality_%s' % num]])
|
favorite_quality.append(channel_node['quality'][settings_node['quality_%s' % num]])
|
||||||
|
|
||||||
# Se filtran los enlaces de itemlist y que se correspondan con los valores de autoplay
|
# Se filtran los enlaces de itemlist y que se correspondan con los valores de autoplay
|
||||||
@@ -175,25 +177,25 @@ def start(itemlist, item):
|
|||||||
|
|
||||||
# si el servidor y la calidad no se encuentran en las listas de favoritos o la url esta repetida,
|
# si el servidor y la calidad no se encuentran en las listas de favoritos o la url esta repetida,
|
||||||
# descartamos el item
|
# descartamos el item
|
||||||
if item.server not in favorite_servers or item.quality not in favorite_quality \
|
if item.server.lower() not in favorite_servers or item.quality not in favorite_quality \
|
||||||
or item.url in url_list_valid:
|
or item.url in url_list_valid:
|
||||||
item.type_b = True
|
item.type_b = True
|
||||||
b_dict['videoitem']= item
|
b_dict['videoitem']= item
|
||||||
autoplay_b.append(b_dict)
|
autoplay_b.append(b_dict)
|
||||||
continue
|
continue
|
||||||
autoplay_elem["indice_server"] = favorite_servers.index(item.server)
|
autoplay_elem["indice_server"] = favorite_servers.index(item.server.lower())
|
||||||
autoplay_elem["indice_quality"] = favorite_quality.index(item.quality)
|
autoplay_elem["indice_quality"] = favorite_quality.index(item.quality)
|
||||||
|
|
||||||
elif priority == 2: # Solo servidores
|
elif priority == 2: # Solo servidores
|
||||||
|
|
||||||
# si el servidor no se encuentra en la lista de favoritos o la url esta repetida,
|
# si el servidor no se encuentra en la lista de favoritos o la url esta repetida,
|
||||||
# descartamos el item
|
# descartamos el item
|
||||||
if item.server not in favorite_servers or item.url in url_list_valid:
|
if item.server.lower() not in favorite_servers or item.url in url_list_valid:
|
||||||
item.type_b = True
|
item.type_b = True
|
||||||
b_dict['videoitem'] = item
|
b_dict['videoitem'] = item
|
||||||
autoplay_b.append(b_dict)
|
autoplay_b.append(b_dict)
|
||||||
continue
|
continue
|
||||||
autoplay_elem["indice_server"] = favorite_servers.index(item.server)
|
autoplay_elem["indice_server"] = favorite_servers.index(item.server.lower())
|
||||||
|
|
||||||
elif priority == 3: # Solo calidades
|
elif priority == 3: # Solo calidades
|
||||||
|
|
||||||
@@ -261,11 +263,11 @@ def start(itemlist, item):
|
|||||||
if not platformtools.is_playing() and not played:
|
if not platformtools.is_playing() and not played:
|
||||||
videoitem = autoplay_elem['videoitem']
|
videoitem = autoplay_elem['videoitem']
|
||||||
logger.debug('videoitem %s' % videoitem)
|
logger.debug('videoitem %s' % videoitem)
|
||||||
if videoitem.server not in max_intentos_servers:
|
if videoitem.server.lower() not in max_intentos_servers:
|
||||||
max_intentos_servers[videoitem.server] = max_intentos
|
max_intentos_servers[videoitem.server.lower()] = max_intentos
|
||||||
|
|
||||||
# Si se han alcanzado el numero maximo de intentos de este servidor saltamos al siguiente
|
# Si se han alcanzado el numero maximo de intentos de este servidor saltamos al siguiente
|
||||||
if max_intentos_servers[videoitem.server] == 0:
|
if max_intentos_servers[videoitem.server.lower()] == 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
lang = " "
|
lang = " "
|
||||||
@@ -312,15 +314,15 @@ def start(itemlist, item):
|
|||||||
logger.debug(str(len(autoplay_list)))
|
logger.debug(str(len(autoplay_list)))
|
||||||
|
|
||||||
# Si hemos llegado hasta aqui es por q no se ha podido reproducir
|
# Si hemos llegado hasta aqui es por q no se ha podido reproducir
|
||||||
max_intentos_servers[videoitem.server] -= 1
|
max_intentos_servers[videoitem.server.lower()] -= 1
|
||||||
|
|
||||||
# Si se han alcanzado el numero maximo de intentos de este servidor
|
# Si se han alcanzado el numero maximo de intentos de este servidor
|
||||||
# preguntar si queremos seguir probando o lo ignoramos
|
# preguntar si queremos seguir probando o lo ignoramos
|
||||||
if max_intentos_servers[videoitem.server] == 0:
|
if max_intentos_servers[videoitem.server.lower()] == 0:
|
||||||
text = "Parece que los enlaces de %s no estan funcionando." % videoitem.server.upper()
|
text = "Parece que los enlaces de %s no estan funcionando." % videoitem.server.upper()
|
||||||
if not platformtools.dialog_yesno("AutoPlay", text,
|
if not platformtools.dialog_yesno("AutoPlay", text,
|
||||||
"¿Desea ignorar todos los enlaces de este servidor?"):
|
"¿Desea ignorar todos los enlaces de este servidor?"):
|
||||||
max_intentos_servers[videoitem.server] = max_intentos
|
max_intentos_servers[videoitem.server.lower()] = max_intentos
|
||||||
|
|
||||||
# Si no quedan elementos en la lista se informa
|
# Si no quedan elementos en la lista se informa
|
||||||
if autoplay_elem == autoplay_list[-1]:
|
if autoplay_elem == autoplay_list[-1]:
|
||||||
@@ -439,7 +441,7 @@ def check_value(channel, itemlist):
|
|||||||
quality_list = channel_node['quality'] = list()
|
quality_list = channel_node['quality'] = list()
|
||||||
|
|
||||||
for item in itemlist:
|
for item in itemlist:
|
||||||
if item.server not in server_list and item.server !='':
|
if item.server.lower() not in server_list and item.server !='':
|
||||||
server_list.append(item.server)
|
server_list.append(item.server)
|
||||||
change = True
|
change = True
|
||||||
if item.quality not in quality_list and item.quality !='':
|
if item.quality not in quality_list and item.quality !='':
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ def episodios(item):
|
|||||||
data_lista = scrapertools.find_single_match(data,
|
data_lista = scrapertools.find_single_match(data,
|
||||||
'<ul class="episodios">(.+?)<\/ul><\/div><\/div><\/div>')
|
'<ul class="episodios">(.+?)<\/ul><\/div><\/div><\/div>')
|
||||||
show = item.title
|
show = item.title
|
||||||
patron_caps = '<img alt=".+?" title=".+?" src="([^"]+)">'
|
patron_caps = '<img alt=".+?" src="([^"]+)"><\/a><\/div><div class=".+?">([^"]+)<\/div>.+?'
|
||||||
patron_caps += '<\/a><\/div><div class=".+?">([^"]+)<\/div>.+?<a .+? href="([^"]+)">([^"]+)<\/a>'
|
patron_caps += '<a .+? href="([^"]+)">([^"]+)<\/a>'
|
||||||
#scrapedthumbnail,#scrapedtempepi, #scrapedurl, #scrapedtitle
|
#scrapedthumbnail,#scrapedtempepi, #scrapedurl, #scrapedtitle
|
||||||
matches = scrapertools.find_multiple_matches(data_lista, patron_caps)
|
matches = scrapertools.find_multiple_matches(data_lista, patron_caps)
|
||||||
for scrapedthumbnail, scrapedtempepi, scrapedurl, scrapedtitle in matches:
|
for scrapedthumbnail, scrapedtempepi, scrapedurl, scrapedtitle in matches:
|
||||||
@@ -148,11 +148,11 @@ def findvideos(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
data1 = scrapertools.find_single_match(data,
|
data1 = scrapertools.find_single_match(data,
|
||||||
'<div id="playex" .+?>(.+?)<\/nav><\/div><\/div>')
|
'<div id="playex" .+?>(.+?)<\/nav><\/div><\/div>')
|
||||||
patron='src="(.+?)"'
|
patron='src="(.+?)"'
|
||||||
itemla = scrapertools.find_multiple_matches(data1,patron)
|
itemla = scrapertools.find_multiple_matches(data1,patron)
|
||||||
if "favicons?domain" in itemla[1]:
|
if "favicons?domain" in itemla[0]:
|
||||||
method = 1
|
method = 1
|
||||||
data2=scrapertools.find_single_match(data, "var \$user_hashs = {(.+?)}")
|
data2=scrapertools.find_single_match(data, "var \$user_hashs = {(.+?)}")
|
||||||
patron='".+?":"(.+?)"'
|
patron='".+?":"(.+?)"'
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
@@ -4,55 +4,79 @@ import re
|
|||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
|
from core import servertools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger
|
|
||||||
from channelselector import get_thumb
|
from channelselector import get_thumb
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
HOST = "http://documentales-online.com/"
|
HOST = "http://documentales-online.com/"
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = list()
|
itemlist = list()
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Novedades", action="videos", url=HOST,
|
||||||
itemlist.append(Item(channel=item.channel, title="Novedades", action="listado", url=HOST,
|
|
||||||
thumbnail=get_thumb('newest', auto=True)))
|
thumbnail=get_thumb('newest', auto=True)))
|
||||||
itemlist.append(Item(channel=item.channel, title="Destacados", action="seccion", url=HOST, extra="destacados",
|
itemlist.append(Item(channel=item.channel, title="Destacados", action="seccion", url=HOST, extra="destacados",
|
||||||
thumbnail=get_thumb('hot', auto=True)))
|
thumbnail=get_thumb('hot', auto=True)))
|
||||||
itemlist.append(Item(channel=item.channel, title="Series", action="seccion", url=HOST, extra="series",
|
itemlist.append(Item(channel=item.channel, title="Series destacadas", action="seccion", url=HOST, extra="series",
|
||||||
thumbnail=get_thumb('tvshows', auto=True)))
|
thumbnail=get_thumb('tvshows', auto=True)))
|
||||||
itemlist.append(Item(channel=item.channel, title="Categorías", action="categorias", url=HOST,
|
itemlist.append(Item(channel=item.channel, title="Categorías", action="categorias", url=HOST,
|
||||||
thumbnail=get_thumb('categories', auto=True)))
|
thumbnail=get_thumb('categories', auto=True)))
|
||||||
# itemlist.append(Item(channel=item.channel, title="Top 100", action="categorias", url=HOST))
|
itemlist.append(Item(channel=item.channel, title="Top 100", action="listado", url=HOST + "top/",
|
||||||
# itemlist.append(Item(channel=item.channel, title="Populares", action="categorias", url=HOST))
|
thumbnail=get_thumb('more voted', auto=True)))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Populares", action="listado", url=HOST + "populares/",
|
||||||
|
thumbnail=get_thumb('more watched', auto=True)))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Series y Temas", action="listado", url=HOST + "series-temas/",
|
||||||
|
thumbnail=get_thumb('tvshows', auto=True)))
|
||||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search",
|
itemlist.append(Item(channel=item.channel, title="Buscar", action="search",
|
||||||
thumbnail=get_thumb('search', auto=True)))
|
thumbnail=get_thumb('search', auto=True)))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
# itemlist.append(Item(channel=item.channel, title=" Series y Temas", action="categorias", url=HOST))
|
|
||||||
|
|
||||||
|
def listado(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = data.replace('<span class="wpp-views">', '')
|
||||||
|
bloque = scrapertools.find_single_match(data, 'class="post-entry(.*?)class="post-share')
|
||||||
|
if "series-temas" not in item.url:
|
||||||
|
patron = '<a href="([^"]+)".*?'
|
||||||
|
patron += 'title="([^"]+)".*?'
|
||||||
|
patron += '/a>([^<]+)<'
|
||||||
|
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||||
|
for scrapedurl, scrapedtitle, scrapedextra in matches:
|
||||||
|
itemlist.append(Item(action = "findvideos",
|
||||||
|
channel = item.channel,
|
||||||
|
title = scrapedtitle + scrapedextra,
|
||||||
|
url = HOST + scrapedurl
|
||||||
|
))
|
||||||
|
else:
|
||||||
|
patron = """<a href='([^']+)'.*?"""
|
||||||
|
patron += """>([^<]+)<.*?"""
|
||||||
|
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||||
|
for scrapedurl, scrapedtitle in matches:
|
||||||
|
itemlist.append(Item(action = "videos",
|
||||||
|
channel = item.channel,
|
||||||
|
title = scrapedtitle,
|
||||||
|
url = HOST + scrapedurl
|
||||||
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def seccion(item):
|
def seccion(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||||
|
|
||||||
if item.extra == "destacados":
|
if item.extra == "destacados":
|
||||||
patron_seccion = '<h4 class="widget-title">Destacados</h4><div class="textwidget"><ul>(.*?)</ul>'
|
patron_seccion = '<h4 class="widget-title">Destacados</h4><div class="textwidget"><ul>(.*?)</ul>'
|
||||||
action = "findvideos"
|
action = "findvideos"
|
||||||
else:
|
else:
|
||||||
patron_seccion = '<h4 class="widget-title">Series destacadas</h4><div class="textwidget"><ul>(.*?)</ul>'
|
patron_seccion = '<h4 class="widget-title">Series destacadas</h4><div class="textwidget"><ul>(.*?)</ul>'
|
||||||
action = "listado"
|
action = "videos"
|
||||||
|
|
||||||
data = scrapertools.find_single_match(data, patron_seccion)
|
data = scrapertools.find_single_match(data, patron_seccion)
|
||||||
|
matches = scrapertools.find_multiple_matches(data, '<a href="([^"]+)">(.*?)</a>')
|
||||||
matches = re.compile('<a href="([^"]+)">(.*?)</a>', re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
aux_action = action
|
aux_action = action
|
||||||
for url, title in matches:
|
for url, title in matches:
|
||||||
if item.extra != "destacados" and "Cosmos (Carl Sagan)" in title:
|
if item.extra != "destacados" and "Cosmos (Carl Sagan)" in title:
|
||||||
@@ -60,61 +84,46 @@ def seccion(item):
|
|||||||
else:
|
else:
|
||||||
action = aux_action
|
action = aux_action
|
||||||
itemlist.append(item.clone(title=title, url=url, action=action, fulltitle=title))
|
itemlist.append(item.clone(title=title, url=url, action=action, fulltitle=title))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def listado(item):
|
def videos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||||
|
pagination = scrapertools.find_single_match(data, "rel='next' href='([^']+)'")
|
||||||
pagination = scrapertools.find_single_match(data, '<div class="older"><a href="([^"]+)"')
|
|
||||||
if not pagination:
|
if not pagination:
|
||||||
pagination = scrapertools.find_single_match(data, '<span class=\'current\'>\d</span>'
|
pagination = scrapertools.find_single_match(data, '<span class=\'current\'>\d</span>'
|
||||||
'<a class="page larger" href="([^"]+)">')
|
'<a class="page larger" href="([^"]+)">')
|
||||||
|
|
||||||
patron = '<ul class="sp-grid">(.*?)</ul>'
|
patron = '<ul class="sp-grid">(.*?)</ul>'
|
||||||
data = scrapertools.find_single_match(data, patron)
|
data = scrapertools.find_single_match(data, patron)
|
||||||
|
|
||||||
matches = re.compile('<a href="([^"]+)">(.*?)</a>.*?<img.*?src="([^"]+)"', re.DOTALL).findall(data)
|
matches = re.compile('<a href="([^"]+)">(.*?)</a>.*?<img.*?src="([^"]+)"', re.DOTALL).findall(data)
|
||||||
|
|
||||||
for url, title, thumb in matches:
|
for url, title, thumb in matches:
|
||||||
itemlist.append(item.clone(title=title, url=url, action="findvideos", fulltitle=title, thumbnail=thumb))
|
itemlist.append(item.clone(title=title, url=url, action="findvideos", fulltitle=title, thumbnail=thumb))
|
||||||
|
|
||||||
if pagination:
|
if pagination:
|
||||||
itemlist.append(item.clone(title=">> Página siguiente", url=pagination))
|
itemlist.append(item.clone(title=">> Página siguiente", url=pagination))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def categorias(item):
|
def categorias(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||||
|
|
||||||
data = scrapertools.find_single_match(data, 'a href="#">Categorías</a><ul class="sub-menu">(.*?)</ul>')
|
data = scrapertools.find_single_match(data, 'a href="#">Categorías</a><ul class="sub-menu">(.*?)</ul>')
|
||||||
matches = re.compile('<a href="([^"]+)">(.*?)</a>', re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, '<a href="([^"]+)">(.*?)</a>')
|
||||||
|
|
||||||
for url, title in matches:
|
for url, title in matches:
|
||||||
itemlist.append(item.clone(title=title, url=url, action="listado", fulltitle=title))
|
itemlist.append(item.clone(title=title, url=url, action="videos", fulltitle=title))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
texto = texto.replace(" ", "+")
|
texto = texto.replace(" ", "+")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
item.url = HOST + "?s=%s" % texto
|
item.url = HOST + "?s=%s" % texto
|
||||||
return listado(item)
|
return videos(item)
|
||||||
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
|
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
@@ -125,37 +134,21 @@ def search(item, texto):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data)
|
||||||
|
if "Cosmos (Carl Sagan)" in item.title:
|
||||||
if item.fulltitle == "Cosmos (Carl Sagan)":
|
patron = '(?s)<p><strong>([^<]+)<.*?'
|
||||||
|
patron += '<iframe.*?src="([^"]+)"'
|
||||||
matches = scrapertools.find_multiple_matches(data,
|
matches = scrapertools.find_multiple_matches(data,patron)
|
||||||
'<p><strong>(.*?)</strong><br /><iframe.+?src="(https://www\.youtube\.com/[^?]+)')
|
|
||||||
|
|
||||||
for title, url in matches:
|
for title, url in matches:
|
||||||
new_item = item.clone(title=title, url=url)
|
itemlist.append(item.clone(action = "play", title=title, url=url
|
||||||
|
))
|
||||||
from core import servertools
|
|
||||||
aux_itemlist = servertools.find_video_items(new_item)
|
|
||||||
for videoitem in aux_itemlist:
|
|
||||||
videoitem.title = new_item.title
|
|
||||||
videoitem.fulltitle = new_item.title
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
# videoitem.thumbnail = item.thumbnail
|
|
||||||
itemlist.extend(aux_itemlist)
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
data = scrapertools.find_multiple_matches(data, '<iframe.+?src="(https://www\.youtube\.com/[^?]+)')
|
data = scrapertools.find_multiple_matches(data, '<iframe.+?src="([^"]+)"')
|
||||||
|
|
||||||
from core import servertools
|
|
||||||
itemlist.extend(servertools.find_video_items(data=",".join(data)))
|
itemlist.extend(servertools.find_video_items(data=",".join(data)))
|
||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.fulltitle = item.fulltitle
|
videoitem.fulltitle = item.fulltitle
|
||||||
videoitem.channel = item.channel
|
videoitem.channel = item.channel
|
||||||
# videoitem.thumbnail = item.thumbnail
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -23,36 +23,6 @@ list_quality = CALIDADES.values()
|
|||||||
list_servers = ['directo', 'openload']
|
list_servers = ['directo', 'openload']
|
||||||
|
|
||||||
host = 'http://doomtv.net/'
|
host = 'http://doomtv.net/'
|
||||||
headers = {
|
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 Chrome/58.0.3029.110',
|
|
||||||
'Referer': host}
|
|
||||||
|
|
||||||
tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
|
||||||
"Suspenso": "https://s13.postimg.org/wmw6vl1cn/suspenso.png",
|
|
||||||
"Drama": "https://s16.postimg.org/94sia332d/drama.png",
|
|
||||||
"Acción": "https://s3.postimg.org/y6o9puflv/accion.png",
|
|
||||||
"Aventura": "https://s10.postimg.org/6su40czih/aventura.png",
|
|
||||||
"Romance": "https://s15.postimg.org/fb5j8cl63/romance.png",
|
|
||||||
"Animación": "https://s13.postimg.org/5on877l87/animacion.png",
|
|
||||||
"Ciencia ficción": "https://s9.postimg.org/diu70s7j3/cienciaficcion.png",
|
|
||||||
"Terror": "https://s7.postimg.org/yi0gij3gb/terror.png",
|
|
||||||
"Documental": "https://s16.postimg.org/7xjj4bmol/documental.png",
|
|
||||||
"Música": "https://s29.postimg.org/bbxmdh9c7/musical.png",
|
|
||||||
"Fantasía": "https://s13.postimg.org/65ylohgvb/fantasia.png",
|
|
||||||
"Bélico Guerra": "https://s23.postimg.org/71itp9hcr/belica.png",
|
|
||||||
"Misterio": "https://s1.postimg.org/w7fdgf2vj/misterio.png",
|
|
||||||
"Crimen": "https://s4.postimg.org/6z27zhirx/crimen.png",
|
|
||||||
"Biográfia": "https://s15.postimg.org/5lrpbx323/biografia.png",
|
|
||||||
"Familia": "https://s7.postimg.org/6s7vdhqrf/familiar.png",
|
|
||||||
"Familiar": "https://s7.postimg.org/6s7vdhqrf/familiar.png",
|
|
||||||
"Intriga": "https://s27.postimg.org/v9og43u2b/intriga.png",
|
|
||||||
"Thriller": "https://s22.postimg.org/5y9g0jsu9/thriller.png",
|
|
||||||
"Guerra": "https://s4.postimg.org/n1h2jp2jh/guerra.png",
|
|
||||||
"Estrenos": "https://s21.postimg.org/fy69wzm93/estrenos.png",
|
|
||||||
"Peleas": "https://s14.postimg.org/we1oyg05t/peleas.png",
|
|
||||||
"Policiales": "https://s21.postimg.org/n9e0ci31z/policial.png",
|
|
||||||
"Uncategorized": "https://s30.postimg.org/uj5tslenl/otros.png",
|
|
||||||
"LGBT": "https://s30.postimg.org/uj5tslenl/otros.png"}
|
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
@@ -177,15 +147,13 @@ def seccion(item):
|
|||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
title = scrapedtitle
|
title = scrapedtitle
|
||||||
thumbnail = ''
|
thumbnail = ''
|
||||||
if title in tgenero:
|
|
||||||
thumbnail = tgenero[title]
|
|
||||||
if url not in duplicado:
|
if url not in duplicado:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action='lista',
|
action='lista',
|
||||||
title=title,
|
title=title,
|
||||||
url=url,
|
url=url,
|
||||||
thumbnail = thumbnail
|
thumbnail=thumbnail
|
||||||
))
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -221,64 +189,25 @@ def newest(categoria):
|
|||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def get_vip(item, url):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(url+'/videocontent').data
|
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
|
||||||
video_id = scrapertools.find_single_match(data, 'id=videoInfo ><span >(.*?)</span>')
|
|
||||||
new_url = 'https://v.d0stream.com/api/videoinfo/%s?src-url=https://Fv.d0stream.com' % video_id
|
|
||||||
json_data = httptools.downloadpage(new_url).data
|
|
||||||
dict_data = jsontools.load(json_data)
|
|
||||||
sources = dict_data['sources']
|
|
||||||
|
|
||||||
for vip_item in sources['mp4_cdn']:
|
|
||||||
vip_url= vip_item['url']
|
|
||||||
vip_quality = vip_item['label']
|
|
||||||
title ='%s [%s]' % (item.title, vip_quality)
|
|
||||||
itemlist.append(item.clone(title = title, url=vip_url, action='play', quality=vip_quality, server='directo'))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
player_vip = scrapertools.find_single_match(data, 'class=movieplay><iframe src=(https://v.d0stream.com.*?) frameborder')
|
|
||||||
itemlist.extend(get_vip(item, player_vip))
|
|
||||||
|
|
||||||
patron = 'id=(tab\d+)><div class=movieplay><(?:iframe|script) src=(.*?)(?:scrolling|><\/script>)'
|
patron = 'id=(tab\d+)><div class=movieplay><(?:iframe|script) src=(.*?)(?:scrolling|frameborder|><\/script>)'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for option, urls in matches:
|
for option, urls in matches:
|
||||||
|
|
||||||
if 'content' in urls:
|
new_item = Item(
|
||||||
urls = '%s%s'%('http:',urls)
|
channel=item.channel,
|
||||||
hidden_data = httptools.downloadpage(urls).data
|
url=urls,
|
||||||
hidden_data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", hidden_data)
|
title=item.title,
|
||||||
patron = 'sources: \[{file: (.*?),'
|
contentTitle=item.title,
|
||||||
matches = re.compile(patron, re.DOTALL).findall(hidden_data)
|
action='play',
|
||||||
|
)
|
||||||
for videoitem in matches:
|
itemlist.append(new_item)
|
||||||
|
|
||||||
new_item = Item(
|
|
||||||
channel = item.channel,
|
|
||||||
url = videoitem,
|
|
||||||
title = item.title,
|
|
||||||
contentTitle = item.title,
|
|
||||||
action = 'play',
|
|
||||||
)
|
|
||||||
itemlist.append(new_item)
|
|
||||||
else:
|
|
||||||
new_item = Item(
|
|
||||||
channel=item.channel,
|
|
||||||
url=urls,
|
|
||||||
title=item.title,
|
|
||||||
contentTitle=item.title,
|
|
||||||
action='play',
|
|
||||||
)
|
|
||||||
itemlist.append(new_item)
|
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||||
|
|||||||
@@ -664,14 +664,12 @@ def findvideos(item):
|
|||||||
data = agrupa_datos(httptools.downloadpage(item.url).data)
|
data = agrupa_datos(httptools.downloadpage(item.url).data)
|
||||||
data_obf = scrapertools.find_single_match(data, "var ad\s*=\s*'([^']+)'")
|
data_obf = scrapertools.find_single_match(data, "var ad\s*=\s*'([^']+)'")
|
||||||
data_decrypt = jsontools.load(obfs(base64.b64decode(data_obf), 126 - int(key)))
|
data_decrypt = jsontools.load(obfs(base64.b64decode(data_obf), 126 - int(key)))
|
||||||
|
|
||||||
infolabels = {}
|
infolabels = {}
|
||||||
year = scrapertools.find_single_match(data, '<span>Año:\s*</span>.*?(\d{4})')
|
year = scrapertools.find_single_match(data, '<span>Año:\s*</span>.*?(\d{4})')
|
||||||
infolabels["year"] = year
|
infolabels["year"] = year
|
||||||
matches = []
|
matches = []
|
||||||
for match in data_decrypt:
|
for match in data_decrypt:
|
||||||
prov = eval(scrapertools.find_single_match(data_js, 'p\[%s\]\s*=\s*(\{.*?\}[\']\})' % match["provider"]))
|
prov = eval(scrapertools.find_single_match(data_js, 'p\[%s\]\s*=\s*(\{.*?\}[\']\})' % match["provider"]))
|
||||||
|
|
||||||
server_url = scrapertools.find_single_match(prov['l'], 'return\s*"(.*?)"')
|
server_url = scrapertools.find_single_match(prov['l'], 'return\s*"(.*?)"')
|
||||||
|
|
||||||
url = '%s%s' % (server_url, match['code'])
|
url = '%s%s' % (server_url, match['code'])
|
||||||
@@ -831,20 +829,10 @@ def get_status(status, type, id):
|
|||||||
## --------------------------------------------------------------------------------
|
## --------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def jhexdecode(t):
|
def jhexdecode(t):
|
||||||
|
r = re.sub(r'_\d+x\w+x(\d+)', 'var_' + r'\1', t)
|
||||||
|
r = re.sub(r'_\d+x\w+', 'var_0', r)
|
||||||
|
|
||||||
k = re.sub(r'(_0x.{4})(?=\(|=)', 'var_0', t).replace('\'','\"')
|
|
||||||
def to_hex(c, type):
|
|
||||||
h = int("%s" % c, 16)
|
|
||||||
if type == '1':
|
|
||||||
return 'p[%s]' % h
|
|
||||||
if type == '2':
|
|
||||||
return '[%s]' % h
|
|
||||||
|
|
||||||
x = re.sub(r'(?:p\[)(0x.{,2})(?:\])', lambda z: to_hex(z.group(1), '1'), k)
|
|
||||||
y = re.sub(r'(?:\(")(0x.{,2})(?:"\))', lambda z: to_hex(z.group(1), '2'), x)
|
|
||||||
|
|
||||||
def to_hx(c):
|
def to_hx(c):
|
||||||
h = int("%s" % c.groups(0), 16)
|
h = int("%s" % c.groups(0), 16)
|
||||||
@@ -852,14 +840,8 @@ def jhexdecode(t):
|
|||||||
return chr(h)
|
return chr(h)
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
r = re.sub(r'(?:\\|)x(\w{2})(?=[^\w\d])', to_hx, y).replace('var ', '')
|
|
||||||
server_list = eval(scrapertools.find_single_match(r, '=(\[.*?\])'))
|
|
||||||
|
|
||||||
for val in range(475,0, -1):
|
r = re.sub(r'(?:\\|)x(\w{2})', to_hx, r).replace('var ', '')
|
||||||
server_list.append(server_list[0])
|
|
||||||
server_list.pop(0)
|
|
||||||
|
|
||||||
r = re.sub(r'=\[(.*?)\]', '=%s' % str(server_list), r)
|
|
||||||
|
|
||||||
f = eval(scrapertools.get_match(r, '\s*var_0\s*=\s*([^;]+);'))
|
f = eval(scrapertools.get_match(r, '\s*var_0\s*=\s*([^;]+);'))
|
||||||
for i, v in enumerate(f):
|
for i, v in enumerate(f):
|
||||||
@@ -875,7 +857,6 @@ def jhexdecode(t):
|
|||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def obfs(data, key, n=126):
|
def obfs(data, key, n=126):
|
||||||
chars = list(data)
|
chars = list(data)
|
||||||
for i in range(0, len(chars)):
|
for i in range(0, len(chars)):
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ from core import servertools
|
|||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
|
||||||
HOST = 'http://peliculasaudiolatino.com'
|
HOST = 'http://verpeliculasenlatino.com'
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import urllib
|
||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
@@ -215,37 +216,29 @@ def findvideos(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = get_source(item.url)
|
data = get_source(item.url)
|
||||||
patron = '<div class=TPlayer.*?\s+id=(.*?)><iframe width=560 height=315 src=(.*?) frameborder=0'
|
patron = '<div class=TPlayerTb.Current id=(.*?)>.*?src=(.*?) frameborder'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
base_link = 'https://repros.live/player/ajaxdata'
|
||||||
for opt, urls_page in matches:
|
for opt, urls_page in matches:
|
||||||
logger.debug ('option: %s' % opt)
|
language = scrapertools.find_single_match (data,'TPlayerNv>.*?tplayernv=%s><span>Opción.*?<span>(.*?)</span>' % opt)
|
||||||
language = scrapertools.find_single_match (data,'data-TPlayerNv=%s><span>Opción <strong>.'
|
headers = {'referer':item.url}
|
||||||
'<\/strong><\/span>.*?<span>(.*?)<\/span'%opt)
|
if 'trembed' in urls_page:
|
||||||
|
urls_page = scrapertools.decodeHtmlentities(urls_page)
|
||||||
video_data = httptools.downloadpage(urls_page).data
|
sub_data=httptools.downloadpage(urls_page).data
|
||||||
servers = scrapertools.find_multiple_matches(video_data,'<button id="(.*?)"')
|
urls_page = scrapertools.find_single_match(sub_data, 'src="(.*?)" ')
|
||||||
for server in servers:
|
video_data = httptools.downloadpage(urls_page, headers=headers).data
|
||||||
quality = item.quality
|
servers = scrapertools.find_multiple_matches(video_data,'data-player="(.*?)" data-embed="(.*?)">')
|
||||||
info_urls = urls_page.replace('embed','get')
|
for server, code in servers:
|
||||||
video_info=httptools.downloadpage(info_urls+'/'+server).data
|
post = {'codigo':code}
|
||||||
video_info = jsontools.load(video_info)
|
post = urllib.urlencode(post)
|
||||||
video_id = video_info['extid']
|
video_json=jsontools.load(httptools.downloadpage('https://repros.live/player/ajaxdata', post=post).data)
|
||||||
video_server = video_info['server']
|
url = video_json['url']
|
||||||
video_status = video_info['status']
|
itemlist.append(item.clone(title='[%s][%s]',
|
||||||
if video_status in ['finished', 'propio']:
|
url=url,
|
||||||
if video_status == 'finished':
|
action='play',
|
||||||
url = 'https://'+video_server+'/embed/'+video_id
|
language=language,
|
||||||
else:
|
))
|
||||||
url = 'https://'+video_server+'/e/'+video_id
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda x: x.title % (x.server.capitalize(), x.language))
|
||||||
title = item.contentTitle + ' [%s] [%s]'%(quality, language)
|
|
||||||
itemlist.append(item.clone(title=title,
|
|
||||||
url=url,
|
|
||||||
action='play',
|
|
||||||
language=language,
|
|
||||||
quality=quality
|
|
||||||
))
|
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist)
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from core import tmdb
|
|||||||
from core.item import Item, InfoLabels
|
from core.item import Item, InfoLabels
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
host = "https://pepecine.info"
|
host = "https://pepecinehd.tv"
|
||||||
perpage = 20
|
perpage = 20
|
||||||
|
|
||||||
def mainlist1(item):
|
def mainlist1(item):
|
||||||
@@ -29,7 +29,7 @@ def mainlist(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel=item.channel,
|
||||||
title="Ultimas",
|
title="Ultimas",
|
||||||
url=host+'/peliculas-tv-online',
|
url=host+'/tv-peliculas-online',
|
||||||
action='list_latest',
|
action='list_latest',
|
||||||
indexp=1,
|
indexp=1,
|
||||||
type='movie'))
|
type='movie'))
|
||||||
@@ -149,7 +149,7 @@ def list_latest(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = get_source(item.url)
|
data = get_source(item.url)
|
||||||
data_url= scrapertools.find_single_match(data,'<iframe.*?src=(.*?) style')
|
data_url= scrapertools.find_single_match(data,'<iframe.*?src=(.*?) ')
|
||||||
data = get_source(data_url)
|
data = get_source(data_url)
|
||||||
patron = "<div class='online'>.*?<img src=(.*?) class=.*?alt=(.*?) title=.*?"
|
patron = "<div class='online'>.*?<img src=(.*?) class=.*?alt=(.*?) title=.*?"
|
||||||
patron += "<b><a href=(.*?) target=.*?align=right><div class=s7>(.*?) <"
|
patron += "<b><a href=(.*?) target=.*?align=right><div class=s7>(.*?) <"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["cast"],
|
"language": ["cast"],
|
||||||
"thumbnail": "plusdede.png",
|
"thumbnail": "https://s18.postimg.cc/e17e98eqh/6_-_4_Isbv_Q3.png",
|
||||||
"banner": "plusdede.png",
|
"banner": "plusdede.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
"movie",
|
"movie",
|
||||||
|
|||||||
@@ -61,17 +61,17 @@ def mainlist(item):
|
|||||||
item.url = HOST
|
item.url = HOST
|
||||||
item.fanart = fanart_host
|
item.fanart = fanart_host
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/Directors%20Chair.png"
|
item.thumbnail = "https://s18.postimg.cc/r5cylu6rd/12_-_oi_RDsdv.png"
|
||||||
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/TV%20Series.png"
|
item.thumbnail = "https://s18.postimg.cc/ruvqy6zl5/15_-_9m9_Dp1m.png"
|
||||||
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True, thumbnail = 'https://s18.postimg.cc/xj21p46ih/10_-_Uf7e_XHE.png'))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
item.thumbnail = ""
|
item.thumbnail = ""
|
||||||
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url=""))
|
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url="", thumbnail='https://s18.postimg.cc/c9efeassp/3_-_QAHK2_Tc.png'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -86,31 +86,31 @@ def menuseries(item):
|
|||||||
item.fanart = fanart_host
|
item.fanart = fanart_host
|
||||||
item.text_color = None
|
item.text_color = None
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/Directors%20Chair.png"
|
item.thumbnail = "https://s18.postimg.cc/r5cylu6rd/12_-_oi_RDsdv.png"
|
||||||
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/TV%20Series.png"
|
item.thumbnail = "https://s18.postimg.cc/ruvqy6zl5/15_-_9m9_Dp1m.png"
|
||||||
itemlist.append(item.clone(title="Series:", folder=False, text_color=color3, text_blod=True, select=True))
|
itemlist.append(item.clone(title="Series:", folder=False, text_color=color3, text_blod=True, select=True))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Novedades", url="https://www.plusdede.com/series"))
|
itemlist.append(item.clone(action="peliculas", title=" Novedades", url="https://www.plusdede.com/series", thumbnail='https://s18.postimg.cc/in3ihji95/11_-_WPg_H5_Kx.png'))
|
||||||
itemlist.append(item.clone(action="generos", title=" Por géneros", url="https://www.plusdede.com/series"))
|
itemlist.append(item.clone(action="generos", title=" Por géneros", url="https://www.plusdede.com/series", thumbnail='https://s18.postimg.cc/p0slktaah/5_-_c_Nf_KRvm.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Siguiendo", url="https://www.plusdede.com/series/following"))
|
item.clone(action="peliculas", title=" Siguiendo", url="https://www.plusdede.com/series/following", thumbnail='https://s18.postimg.cc/68gqh7j15/7_-_tqw_AHa5.png'))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Capítulos Pendientes",
|
itemlist.append(item.clone(action="peliculas", title=" Capítulos Pendientes",
|
||||||
url="https://www.plusdede.com/series/mypending/0?popup=1", viewmode="movie"))
|
url="https://www.plusdede.com/series/mypending/0?popup=1", viewmode="movie", thumbnail='https://s18.postimg.cc/9s2o71w1l/2_-_3dbbx7_K.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Favoritas", url="https://www.plusdede.com/series/favorites"))
|
item.clone(action="peliculas", title=" Favoritas", url="https://www.plusdede.com/series/favorites", thumbnail='https://s18.postimg.cc/n8zmpwynd/4_-_JGrig_Ep.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Pendientes", url="https://www.plusdede.com/series/pending"))
|
item.clone(action="peliculas", title=" Pendientes", url="https://www.plusdede.com/series/pending", thumbnail='https://s18.postimg.cc/4gnrmacix/13_-_cwl_TDog.png'))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Terminadas", url="https://www.plusdede.com/series/seen"))
|
itemlist.append(item.clone(action="peliculas", title=" Terminadas", url="https://www.plusdede.com/series/seen", thumbnail='https://s18.postimg.cc/5vpcay0qh/17_-_M2in_Fp_O.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Recomendadas", url="https://www.plusdede.com/series/recommended"))
|
item.clone(action="peliculas", title=" Recomendadas", url="https://www.plusdede.com/series/recommended", thumbnail='https://s18.postimg.cc/bwn182sih/14_-_fin32_Kp.png'))
|
||||||
itemlist.append(item.clone(action="search", title=" Buscar...", url="https://www.plusdede.com/series"))
|
itemlist.append(item.clone(action="search", title=" Buscar...", url="https://www.plusdede.com/series", thumbnaiil='https://s18.postimg.cc/s7n54ghvt/1_-_01_ZDYii.png'))
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True, thumbnail='https://s18.postimg.cc/xj21p46ih/10_-_Uf7e_XHE.png'))
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
item.thumbnail = ""
|
item.thumbnail = ""
|
||||||
itemlist.append(Item(channel=item.channel, action="settingCanal", title="Configuración...", url=""))
|
itemlist.append(Item(channel=item.channel, action="settingCanal", title="Configuración...", url="", thumbnail='https://s18.postimg.cc/c9efeassp/3_-_QAHK2_Tc.png'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -122,29 +122,29 @@ def menupeliculas(item):
|
|||||||
item.fanart = fanart_host
|
item.fanart = fanart_host
|
||||||
item.text_color = None
|
item.text_color = None
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/Directors%20Chair.png"
|
item.thumbnail = "https://s18.postimg.cc/r5cylu6rd/12_-_oi_RDsdv.png"
|
||||||
itemlist.append(item.clone(title="Películas:", folder=False, text_color=color3, text_blod=True, select=True))
|
itemlist.append(item.clone(title="Películas:", folder=False, text_color=color3, text_blod=True, select=True))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Novedades", url="https://www.plusdede.com/pelis"))
|
itemlist.append(item.clone(action="peliculas", title=" Novedades", url="https://www.plusdede.com/pelis", thumbnail='https://s18.postimg.cc/in3ihji95/11_-_WPg_H5_Kx.png'))
|
||||||
itemlist.append(item.clone(action="generos", title=" Por géneros", url="https://www.plusdede.com/pelis"))
|
itemlist.append(item.clone(action="generos", title=" Por géneros", url="https://www.plusdede.com/pelis", thumbnail='https://s18.postimg.cc/p0slktaah/5_-_c_Nf_KRvm.png'))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Solo HD", url="https://www.plusdede.com/pelis?quality=3"))
|
itemlist.append(item.clone(action="peliculas", title=" Solo HD", url="https://www.plusdede.com/pelis?quality=3", thumbnail='https://s18.postimg.cc/e17e95mfd/16_-_qmqn4_Si.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Pendientes", url="https://www.plusdede.com/pelis/pending"))
|
item.clone(action="peliculas", title=" Pendientes", url="https://www.plusdede.com/pelis/pending", thumbnail='https://s18.postimg.cc/4gnrmacix/13_-_cwl_TDog.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Recomendadas", url="https://www.plusdede.com/pelis/recommended"))
|
item.clone(action="peliculas", title=" Recomendadas", url="https://www.plusdede.com/pelis/recommended", thumbnail='https://s18.postimg.cc/bwn182sih/14_-_fin32_Kp.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="peliculas", title=" Favoritas", url="https://www.plusdede.com/pelis/favorites"))
|
item.clone(action="peliculas", title=" Favoritas", url="https://www.plusdede.com/pelis/favorites", thumbnail='https://s18.postimg.cc/n8zmpwynd/4_-_JGrig_Ep.png'))
|
||||||
itemlist.append(item.clone(action="peliculas", title=" Vistas", url="https://www.plusdede.com/pelis/seen"))
|
itemlist.append(item.clone(action="peliculas", title=" Vistas", url="https://www.plusdede.com/pelis/seen", thumbnail='https://s18.postimg.cc/5vpcay0qh/17_-_M2in_Fp_O.png'))
|
||||||
itemlist.append(item.clone(action="search", title=" Buscar...", url="https://www.plusdede.com/pelis"))
|
itemlist.append(item.clone(action="search", title=" Buscar...", url="https://www.plusdede.com/pelis", thumbnail='https://s18.postimg.cc/s7n54ghvt/1_-_01_ZDYii.png'))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/TV%20Series.png"
|
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/TV%20Series.png"
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True, thumbnail='https://s18.postimg.cc/ruvqy6zl5/15_-_9m9_Dp1m.png'))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Listas", action="menulistas", text_color=color3, text_blod=True, thumbnail='https://s18.postimg.cc/xj21p46ih/10_-_Uf7e_XHE.png'))
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
item.thumbnail = ""
|
item.thumbnail = ""
|
||||||
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url=""))
|
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url="", thumbnail='https://s18.postimg.cc/c9efeassp/3_-_QAHK2_Tc.png'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -156,23 +156,23 @@ def menulistas(item):
|
|||||||
item.fanart = fanart_host
|
item.fanart = fanart_host
|
||||||
item.text_color = None
|
item.text_color = None
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/Directors%20Chair.png"
|
item.thumbnail = "https://s18.postimg.cc/r5cylu6rd/12_-_oi_RDsdv.png"
|
||||||
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Películas", action="menupeliculas", text_color=color3, text_blod=True))
|
||||||
|
|
||||||
item.thumbnail = "https://github.com/master-1970/resources/raw/master/images/genres/0/TV%20Series.png"
|
item.thumbnail = "https://s18.postimg.cc/ruvqy6zl5/15_-_9m9_Dp1m.png"
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Series", action="menuseries", text_color=color3, text_blod=True))
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Listas:", folder=False, text_color=color3, text_blod=True))
|
itemlist.append(item.clone(title="Listas:", folder=False, text_color=color3, text_blod=True, thumbnail='https://s18.postimg.cc/xj21p46ih/10_-_Uf7e_XHE.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="listas", tipo="populares", title=" Populares", url="https://www.plusdede.com/listas"))
|
item.clone(action="listas", tipo="populares", title=" Populares", url="https://www.plusdede.com/listas", thumbnail='https://s18.postimg.cc/7aqwzrha1/8_-_3rn14_Tq.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="listas", tipo="siguiendo", title=" Siguiendo", url="https://www.plusdede.com/listas"))
|
item.clone(action="listas", tipo="siguiendo", title=" Siguiendo", url="https://www.plusdede.com/listas", thumbnail='https://s18.postimg.cc/4tf5sha89/9_-_z_F8c_UBT.png'))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="listas", tipo="tuslistas", title=" Tus Listas", url="https://www.plusdede.com/listas"))
|
item.clone(action="listas", tipo="tuslistas", title=" Tus Listas", url="https://www.plusdede.com/listas"))
|
||||||
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
itemlist.append(item.clone(title="", folder=False, thumbnail=thumbnail_host))
|
||||||
item.thumbnail = ""
|
item.thumbnail = ""
|
||||||
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url=""))
|
itemlist.append(item.clone(channel=item.channel, action="settingCanal", title="Configuración...", url="", thumbnail='https://s18.postimg.cc/c9efeassp/3_-_QAHK2_Tc.png'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Executable → Regular
Executable → Regular
@@ -24,7 +24,7 @@
|
|||||||
"Inglés",
|
"Inglés",
|
||||||
"Latino",
|
"Latino",
|
||||||
"Catalán",
|
"Catalán",
|
||||||
"VOS"
|
"VOSE"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -44,4 +44,4 @@
|
|||||||
"visible": true
|
"visible": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -140,6 +140,8 @@ def listado(item):
|
|||||||
extra = ""
|
extra = ""
|
||||||
context = "movie"
|
context = "movie"
|
||||||
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
year = scrapertools.find_single_match(scrapedthumbnail, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
if ".com/serie" in url and "/miniseries" not in url:
|
if ".com/serie" in url and "/miniseries" not in url:
|
||||||
action = "episodios"
|
action = "episodios"
|
||||||
@@ -219,6 +221,8 @@ def listado_busqueda(item):
|
|||||||
if calidad == "":
|
if calidad == "":
|
||||||
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
calidad = scrapertools.find_single_match(title, r'..*?(\[.*?.*\])') #movies
|
||||||
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
year = scrapertools.find_single_match(thumb, r'-(\d{4})')
|
||||||
|
if not year or year <= "1900":
|
||||||
|
year = '-'
|
||||||
|
|
||||||
# fix encoding for title
|
# fix encoding for title
|
||||||
title = scrapertools.htmlclean(title)
|
title = scrapertools.htmlclean(title)
|
||||||
@@ -319,7 +323,14 @@ def findvideos(item):
|
|||||||
# item.url = item.url.replace(".com/",".com/ver-online/")
|
# item.url = item.url.replace(".com/",".com/ver-online/")
|
||||||
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
# item.url = item.url.replace(".com/",".com/descarga-directa/")
|
||||||
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
item.url = item.url.replace(".com/", ".com/descarga-torrent/")
|
||||||
|
|
||||||
|
# Obtener la información actualizada del Episodio
|
||||||
|
if item.contentType == "episode":
|
||||||
|
if not item.contentTitle and (not item.infoLabels['title'] or item.infoLabels['title'] == 'null' or item.infoLabels['title'] == "None"):
|
||||||
|
tmdb.set_infoLabels_item(item, seekTmdb = True)
|
||||||
|
if not item.contentTitle:
|
||||||
|
item.contentTitle = item.infoLabels['title']
|
||||||
|
|
||||||
# Descarga la página
|
# Descarga la página
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
data = re.sub(r"\n|\r|\t|\s{2}|(<!--.*?-->)", "", httptools.downloadpage(item.url).data)
|
||||||
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
data = unicode(data, "iso-8859-1", errors="replace").encode("utf-8")
|
||||||
@@ -367,7 +378,7 @@ def findvideos(item):
|
|||||||
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
itemlist.append(item.clone(title=title_gen, action="", folder=False)) #Título con todos los datos del vídeo
|
||||||
|
|
||||||
title = title_torrent
|
title = title_torrent
|
||||||
title_torrent = '[COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
title_torrent = '[COLOR salmon]??[/COLOR], [COLOR yellow][Torrent]- [/COLOR]%s [online]' % (title_torrent)
|
||||||
if url != "": #Torrent
|
if url != "": #Torrent
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
Item(channel=item.channel, action="play", server="torrent", title=title_torrent, fulltitle=title,
|
||||||
@@ -410,6 +421,14 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
titulo = '%s, %s' % (item.alive, titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + titulo + " / " + enlace)
|
||||||
|
raise
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor, title=titulo,
|
||||||
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
fulltitle=title, url=enlace, thumbnail=logo, plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
@@ -446,6 +465,15 @@ def findvideos(item):
|
|||||||
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
devuelve = servertools.findvideosbyserver(enlace, servidor)
|
||||||
if devuelve:
|
if devuelve:
|
||||||
enlace = devuelve[0][1]
|
enlace = devuelve[0][1]
|
||||||
|
if p <= 2:
|
||||||
|
item.alive = servertools.check_video_link(enlace, servidor)
|
||||||
|
if item.alive.lower() == "ok":
|
||||||
|
parte_titulo = '%s, %s' % (item.alive, parte_titulo)
|
||||||
|
elif item.alive == "??":
|
||||||
|
parte_titulo = '[COLOR salmon]%s[/COLOR], %s' % (item.alive, parte_titulo)
|
||||||
|
else:
|
||||||
|
logger.debug(item.alive + ": / " + parte_titulo + " / " + enlace)
|
||||||
|
break
|
||||||
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
itemlist.append(Item(fanart=item.fanart, channel=item.channel, action="play", server=servidor,
|
||||||
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
title=parte_titulo, fulltitle=title, url=enlace, thumbnail=logo,
|
||||||
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
plot=item.plot, infoLabels=item.infoLabels, folder=False))
|
||||||
|
|||||||
Executable → Regular
+23
-22
@@ -1,22 +1,23 @@
|
|||||||
{
|
{
|
||||||
"id": "vertelenovelas",
|
"id": "tvvip",
|
||||||
"name": "Ver Telenovelas",
|
"name": "TV-VIP",
|
||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["cast", "lat"],
|
"language": ["cast"],
|
||||||
"thumbnail": "vertelenovelas.png",
|
"thumbnail": "http://i.imgur.com/gNHVlI4.png",
|
||||||
"banner": "vertelenovelas.png",
|
"banner": "http://i.imgur.com/wyRk5AG.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
"tvshow"
|
"movie",
|
||||||
],
|
"tvshow"
|
||||||
"settings": [
|
],
|
||||||
{
|
"settings": [
|
||||||
"id": "include_in_global_search",
|
{
|
||||||
"type": "bool",
|
"id": "include_in_global_search",
|
||||||
"label": "Incluir en busqueda global",
|
"type": "bool",
|
||||||
"default": false,
|
"label": "Incluir en busqueda global",
|
||||||
"enabled": true,
|
"default": false,
|
||||||
"visible": true
|
"enabled": "!eq(-1,'') + !eq(-2,'')",
|
||||||
}
|
"visible": true
|
||||||
]
|
}
|
||||||
}
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,666 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import unicodedata
|
||||||
|
import urllib
|
||||||
|
import time
|
||||||
|
|
||||||
|
from core import channeltools
|
||||||
|
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 platformcode import config, logger
|
||||||
|
from platformcode import platformtools
|
||||||
|
|
||||||
|
host = "http://tv-vip.com"
|
||||||
|
|
||||||
|
def mainlist(item):
|
||||||
|
logger.info()
|
||||||
|
item.viewmode = "movie"
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(host + "/json/playlist/home/index.json")
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Películas", action="submenu",
|
||||||
|
thumbnail=host+"/json/playlist/peliculas/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/peliculas/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Series", action="submenu",
|
||||||
|
thumbnail=host+"/json/playlist/series/poster.jpg",
|
||||||
|
fanart=host+"/json/playlist/series/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Versión Original", action="entradasconlistas",
|
||||||
|
url=host+"/json/playlist/version-original/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/version-original/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/version-original/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Documentales", action="entradasconlistas",
|
||||||
|
url=host+"/json/playlist/documentales/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/documentales/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/documentales/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Películas Infantiles", action="entradasconlistas",
|
||||||
|
url=host+"/json/playlist/peliculas-infantiles/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/peliculas-infantiles/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/peliculas-infantiles/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Series Infantiles", action="entradasconlistas",
|
||||||
|
url=host+"/json/playlist/series-infantiles/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/series-infantiles/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/series-infantiles/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Buscar...", action="search",
|
||||||
|
thumbnail="http://i.imgur.com/gNHVlI4.png", fanart="http://i.imgur.com/9loVksV.png"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def search(item, texto):
|
||||||
|
logger.info()
|
||||||
|
texto = texto.replace(" ", "%20")
|
||||||
|
if item.title == "Buscar...": item.extra = "local"
|
||||||
|
item.url = host + "/video-prod/s/search?q=%s&n=100" % texto
|
||||||
|
try:
|
||||||
|
return busqueda(item, texto)
|
||||||
|
# Se captura la excepción, para no interrumpir al buscador global si un canal falla
|
||||||
|
except:
|
||||||
|
for line in sys.exc_info():
|
||||||
|
logger.error("%s" % line)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def busqueda(item, texto):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
for child in data["objectList"]:
|
||||||
|
infolabels = {}
|
||||||
|
infolabels['year'] = child['year']
|
||||||
|
if child['tags']: infolabels['genre'] = ', '.join([x.strip() for x in child['tags']])
|
||||||
|
infolabels['rating'] = child['rate'].replace(',', '.')
|
||||||
|
infolabels['votes'] = child['rateCount']
|
||||||
|
if child['cast']: infolabels['cast'] = child['cast'].split(",")
|
||||||
|
infolabels['director'] = child['director']
|
||||||
|
if 'playListChilds' not in child:
|
||||||
|
infolabels['plot'] = child['description']
|
||||||
|
type = "repo"
|
||||||
|
fulltitle = child['name']
|
||||||
|
title = child['name']
|
||||||
|
infolabels['duration'] = child['duration']
|
||||||
|
if child['height'] < 720:
|
||||||
|
quality = "[B] [SD][/B]"
|
||||||
|
elif child['height'] < 1080:
|
||||||
|
quality = "[B] [720p][/B]"
|
||||||
|
elif child['height'] < 2160:
|
||||||
|
quality = "[B] [1080p][/B]"
|
||||||
|
elif child['height'] >= 2160:
|
||||||
|
quality = "[B] [4k][/B]"
|
||||||
|
if child['name'] == "":
|
||||||
|
title = child['id'].rsplit(".", 1)[0]
|
||||||
|
else:
|
||||||
|
title = child['name']
|
||||||
|
if child['year']:
|
||||||
|
title += " (" + child['year'] + ")"
|
||||||
|
title += quality
|
||||||
|
else:
|
||||||
|
type = "playlist"
|
||||||
|
infolabels['plot'] = "Contiene:\n" + "\n".join(child['playListChilds']) + "\n".join(child['repoChilds'])
|
||||||
|
fulltitle = child['id']
|
||||||
|
title = "[COLOR red][LISTA][/COLOR] " + child['id'].replace('-', ' ').capitalize() + " ([COLOR gold]" + \
|
||||||
|
str(child['number']) + "[/COLOR])"
|
||||||
|
# En caso de búsqueda global se filtran los resultados
|
||||||
|
if item.extra != "local":
|
||||||
|
if "+" in texto: texto = "|".join(texto.split("+"))
|
||||||
|
if not re.search(r'(?i)' + texto, title, flags=re.DOTALL): continue
|
||||||
|
url = host + "/json/%s/%s/index.json" % (type, child["id"])
|
||||||
|
# Fanart
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/%s/%s/background.jpg" % (type, child["id"])
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/%s/%s/thumbnail.jpg" % (type, child["id"])
|
||||||
|
# Thumbnail
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/%s/%s/poster.jpg" % (type, child["id"])
|
||||||
|
else:
|
||||||
|
thumbnail = fanart
|
||||||
|
if type == 'playlist':
|
||||||
|
itemlist.insert(0, Item(channel=item.channel, action="entradasconlistas", title=title,
|
||||||
|
url=url, thumbnail=thumbnail, fanart=fanart, fulltitle=fulltitle,
|
||||||
|
infoLabels=infolabels, viewmode="movie_with_plot", folder=True))
|
||||||
|
else:
|
||||||
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url,
|
||||||
|
thumbnail=thumbnail, fanart=fanart, fulltitle=fulltitle, contentTitle=fulltitle,
|
||||||
|
context="05", infoLabels=infolabels, viewmode="movie_with_plot", folder=True))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def submenu(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
if item.title == "Series":
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Nuevos Capítulos", action="episodios",
|
||||||
|
url=host+"/json/playlist/nuevos-capitulos/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/nuevos-capitulos/background.jpg",
|
||||||
|
fanart=host+"/json/playlist/nuevos-capitulos/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Más Vistas", action="series",
|
||||||
|
url=host+"/json/playlist/top-series/index.json",
|
||||||
|
thumbnail=host+"/playlist/top-series/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/top-series/background.jpg",
|
||||||
|
extra1="Series"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Últimas Series", action="series",
|
||||||
|
url=host+"/json/playlist/series/index.json",
|
||||||
|
thumbnail=item.thumbnail, fanart=item.fanart, extra1="Series"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Lista de Series A-Z", action="series",
|
||||||
|
url=host+"/json/playlist/series/index.json", thumbnail=item.thumbnail,
|
||||||
|
fanart=item.fanart, extra1="Series"))
|
||||||
|
else:
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Novedades", action="entradas",
|
||||||
|
url=host+"/json/playlist/000-novedades/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/ultimas-peliculas/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/ultimas-peliculas/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Más vistas", action="entradas",
|
||||||
|
url=host+"/json/playlist/peliculas-mas-vistas/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/peliculas-mas-vistas/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/peliculas-mas-vistas/background.jpg"))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Categorías", action="cat",
|
||||||
|
url=host+"/json/playlist/peliculas/index.json",
|
||||||
|
thumbnail=item.thumbnail, fanart=item.fanart))
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Películas 3D", action="entradasconlistas",
|
||||||
|
url=host+"/json/playlist/3D/index.json",
|
||||||
|
thumbnail=host+"/json/playlist/3D/thumbnail.jpg",
|
||||||
|
fanart=host+"/json/playlist/3D/background.jpg"))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def cat(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
exception = ["peliculas-mas-vistas", "ultimas-peliculas"]
|
||||||
|
for child in data["sortedPlaylistChilds"]:
|
||||||
|
if child["id"] not in exception:
|
||||||
|
url = host + "/json/playlist/%s/index.json" % child["id"]
|
||||||
|
# Fanart
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/playlist/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/playlist/%s/thumbnail.jpg" % child["id"]
|
||||||
|
# Thumbnail
|
||||||
|
thumbnail = host + "/json/playlist/%s/thumbnail.jpg" % child["id"]
|
||||||
|
title = child['id'].replace('-', ' ').capitalize().replace("Manga", "Animación/Cine Oriental")
|
||||||
|
title += " ([COLOR gold]" + str(child['number']) + "[/COLOR])"
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel, action="entradasconlistas", title=title, url=url,
|
||||||
|
thumbnail=thumbnail, fanart=fanart, folder=True))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def entradas(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
infolabels = {}
|
||||||
|
if item.title == "Nuevos Capítulos":
|
||||||
|
context = "5"
|
||||||
|
else:
|
||||||
|
context = "05"
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
infolabels['year'] = child['year']
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
thumbnail = ""
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child["id"]
|
||||||
|
if child['height'] < 720:
|
||||||
|
quality = "[B] [SD][/B]"
|
||||||
|
elif child['height'] < 1080:
|
||||||
|
quality = "[B] [720p][/B]"
|
||||||
|
elif child['height'] < 2160:
|
||||||
|
quality = "[B] [1080p][/B]"
|
||||||
|
elif child['height'] >= 2160:
|
||||||
|
quality = "[B] [4k][/B]"
|
||||||
|
fulltitle = child['name']
|
||||||
|
title = child['name']
|
||||||
|
if child['year']:
|
||||||
|
title += " (" + child['year'] + ")"
|
||||||
|
title += quality
|
||||||
|
itemlist.append(Item(channel=item.channel, action="findvideos", server="", title=title, url=url,
|
||||||
|
thumbnail=thumbnail, fulltitle=fulltitle, infoLabels=infolabels,
|
||||||
|
contentTitle=fulltitle, context=context))
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def entradasconlistas(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
# Si hay alguna lista
|
||||||
|
contentSerie = False
|
||||||
|
contentList = False
|
||||||
|
if data['playListChilds']:
|
||||||
|
itemlist.append(Item(channel=item.channel, title="**LISTAS**", action="", text_color="red", text_blod=True,
|
||||||
|
folder=False))
|
||||||
|
for child in data['sortedPlaylistChilds']:
|
||||||
|
infolabels = {}
|
||||||
|
infolabels['plot'] = "Contiene:\n" + "\n".join(child['playListChilds']) + "\n".join(child['repoChilds'])
|
||||||
|
if child['seasonNumber'] and not contentList and re.search(r'(?i)temporada', child['id']):
|
||||||
|
infolabels['season'] = child['seasonNumber']
|
||||||
|
contentSerie = True
|
||||||
|
else:
|
||||||
|
contentSerie = False
|
||||||
|
contentList = True
|
||||||
|
title = child['id'].replace('-', ' ').capitalize() + " ([COLOR gold]" + str(child['number']) + "[/COLOR])"
|
||||||
|
url = host + "/json/playlist/%s/index.json" % child["id"]
|
||||||
|
thumbnail = host + "/json/playlist/%s/thumbnail.jpg" % child["id"]
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/playlist/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/playlist/%s/thumbnail.jpg" % child["id"]
|
||||||
|
itemlist.append(Item(channel=item.channel, action="entradasconlistas", title=title,
|
||||||
|
url=url, thumbnail=thumbnail, fanart=fanart, fulltitle=child['id'],
|
||||||
|
infoLabels=infolabels, viewmode="movie_with_plot"))
|
||||||
|
else:
|
||||||
|
contentList = True
|
||||||
|
|
||||||
|
if data["sortedRepoChilds"] and len(itemlist) > 0:
|
||||||
|
itemlist.append(Item(channel=item.channel, title="**VÍDEOS**", action="", text_color="blue", text_blod=True,
|
||||||
|
folder=False))
|
||||||
|
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
infolabels = {}
|
||||||
|
infolabels['plot'] = child['description']
|
||||||
|
infolabels['year'] = data['year']
|
||||||
|
if child['tags']: infolabels['genre'] = ', '.join([x.strip() for x in child['tags']])
|
||||||
|
infolabels['rating'] = child['rate'].replace(',', '.')
|
||||||
|
infolabels['votes'] = child['rateCount']
|
||||||
|
infolabels['duration'] = child['duration']
|
||||||
|
if child['cast']: infolabels['cast'] = child['cast'].split(",")
|
||||||
|
infolabels['director'] = child['director']
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
# Fanart
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/repo/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/repo/%s/thumbnail.jpg" % child["id"]
|
||||||
|
# Thumbnail
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
thumbnail = fanart
|
||||||
|
if child['height'] < 720:
|
||||||
|
quality = "[B] [SD][/B]"
|
||||||
|
elif child['height'] < 1080:
|
||||||
|
quality = "[B] [720p][/B]"
|
||||||
|
elif child['height'] < 2160:
|
||||||
|
quality = "[B] [1080p][/B]"
|
||||||
|
elif child['height'] >= 2160:
|
||||||
|
quality = "[B] [4k][/B]"
|
||||||
|
fulltitle = child['name']
|
||||||
|
if child['name'] == "":
|
||||||
|
title = child['id'].rsplit(".", 1)[0]
|
||||||
|
else:
|
||||||
|
title = child['name']
|
||||||
|
if child['year']:
|
||||||
|
title += " (" + child['year'] + ")"
|
||||||
|
title += quality
|
||||||
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url,
|
||||||
|
thumbnail=thumbnail, fanart=fanart, fulltitle=fulltitle, infoLabels=infolabels,
|
||||||
|
contentTitle=fulltitle, context="05", viewmode="movie_with_plot", folder=True))
|
||||||
|
# Se añade item para añadir la lista de vídeos a la videoteca
|
||||||
|
if data['sortedRepoChilds'] and len(itemlist) > 0 and contentList:
|
||||||
|
if config.get_videolibrary_support():
|
||||||
|
itemlist.append(Item(channel=item.channel, text_color="green", title="Añadir esta lista a la videoteca",
|
||||||
|
url=item.url, action="listas"))
|
||||||
|
elif contentSerie:
|
||||||
|
if config.get_videolibrary_support():
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||||
|
action="series_library", fulltitle=data['name'], show=data['name'],
|
||||||
|
text_color="green"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def series(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
exception = ["top-series", "nuevos-capitulos"]
|
||||||
|
for child in data["sortedPlaylistChilds"]:
|
||||||
|
if child["id"] not in exception:
|
||||||
|
infolabels = {}
|
||||||
|
infolabels['plot'] = child['description']
|
||||||
|
infolabels['year'] = child['year']
|
||||||
|
if child['tags']: infolabels['genre'] = ', '.join([x.strip() for x in child['tags']])
|
||||||
|
infolabels['rating'] = child['rate'].replace(',', '.')
|
||||||
|
infolabels['votes'] = child['rateCount']
|
||||||
|
if child['cast']: infolabels['cast'] = child['cast'].split(",")
|
||||||
|
infolabels['director'] = child['director']
|
||||||
|
infolabels['mediatype'] = "episode"
|
||||||
|
if child['seasonNumber']: infolabels['season'] = child['seasonNumber']
|
||||||
|
url = host + "/json/playlist/%s/index.json" % child["id"]
|
||||||
|
# Fanart
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/playlist/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/playlist/%s/thumbnail.jpg" % child["id"]
|
||||||
|
# Thumbnail
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/playlist/%s/poster.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
thumbnail = fanart
|
||||||
|
if item.extra1 == "Series":
|
||||||
|
if child['name'] != "":
|
||||||
|
fulltitle = child['name']
|
||||||
|
fulltitle = fulltitle.replace('-', '')
|
||||||
|
title = child['name'] + " (" + child['year'] + ")"
|
||||||
|
else:
|
||||||
|
title = fulltitle = child['id'].capitalize()
|
||||||
|
if "Temporada" not in title:
|
||||||
|
title += " [Temporadas: [COLOR gold]" + str(child['numberOfSeasons']) + "[/COLOR]]"
|
||||||
|
elif item.title == "Más Vistas":
|
||||||
|
title = title.replace("- Temporada", "--- Temporada")
|
||||||
|
else:
|
||||||
|
if data['name'] != "":
|
||||||
|
fulltitle = data['name']
|
||||||
|
if child['seasonNumber']:
|
||||||
|
title = data['name'] + " --- Temporada " + child['seasonNumber'] + \
|
||||||
|
" [COLOR gold](" + str(child['number']) + ")[/COLOR]"
|
||||||
|
else:
|
||||||
|
title = child['name'] + " [COLOR gold](" + str(child['number']) + ")[/COLOR]"
|
||||||
|
else:
|
||||||
|
fulltitle = data['id']
|
||||||
|
if child['seasonNumber']:
|
||||||
|
title = data['id'].capitalize() + " --- Temporada " + child['seasonNumber'] + \
|
||||||
|
" [COLOR gold](" + str(child['number']) + ")[/COLOR]"
|
||||||
|
else:
|
||||||
|
title = data['id'].capitalize() + " [COLOR gold](" + str(child['number']) + ")[/COLOR]"
|
||||||
|
|
||||||
|
if not child['playListChilds']:
|
||||||
|
action = "episodios"
|
||||||
|
else:
|
||||||
|
action = "series"
|
||||||
|
itemlist.append(Item(channel=item.channel, action=action, title=title, url=url, server="",
|
||||||
|
thumbnail=thumbnail, fanart=fanart, fulltitle=fulltitle, infoLabels=infolabels,
|
||||||
|
contentSerieName=fulltitle, context="25", viewmode="movie_with_plot", folder=True))
|
||||||
|
if len(itemlist) == len(data["sortedPlaylistChilds"]) and item.extra1 != "Series":
|
||||||
|
itemlist.sort(key=lambda item: item.title, reverse=True)
|
||||||
|
if config.get_videolibrary_support():
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||||
|
action="add_serie_to_library", show=data['name'],
|
||||||
|
text_color="green", extra="series_library"))
|
||||||
|
if item.title == "Últimas Series": return itemlist
|
||||||
|
if item.title == "Lista de Series A-Z": itemlist.sort(key=lambda item: item.fulltitle)
|
||||||
|
if data["sortedRepoChilds"] and len(itemlist) > 0:
|
||||||
|
itemlist.append(Item(channel=item.channel, title="**VÍDEOS RELACIONADOS/MISMA TEMÁTICA**", text_color="blue",
|
||||||
|
text_blod=True, action="", folder=False))
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
infolabels = {}
|
||||||
|
if child['description']:
|
||||||
|
infolabels['plot'] = data['description']
|
||||||
|
else:
|
||||||
|
infolabels['plot'] = child['description']
|
||||||
|
infolabels['year'] = data['year']
|
||||||
|
if not child['tags']:
|
||||||
|
infolabels['genre'] = ', '.join([x.strip() for x in data['tags']])
|
||||||
|
else:
|
||||||
|
infolabels['genre'] = ', '.join([x.strip() for x in child['tags']])
|
||||||
|
infolabels['rating'] = child['rate'].replace(',', '.')
|
||||||
|
infolabels['duration'] = child['duration']
|
||||||
|
if child['cast']: infolabels['cast'] = child['cast'].split(",")
|
||||||
|
infolabels['director'] = child['director']
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/repo/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/repo/%s/thumbnail.jpg" % child["id"]
|
||||||
|
# Thumbnail
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
thumbnail = fanart
|
||||||
|
if child['height'] < 720:
|
||||||
|
quality = "[B] [SD][/B]"
|
||||||
|
elif child['height'] < 1080:
|
||||||
|
quality = "[B] [720p][/B]"
|
||||||
|
elif child['height'] < 2160:
|
||||||
|
quality = "[B] [1080p][/B]"
|
||||||
|
elif child['height'] >= 2160:
|
||||||
|
quality = "[B] [1080p][/B]"
|
||||||
|
fulltitle = child['name']
|
||||||
|
if child['name'] == "":
|
||||||
|
title = child['id'].rsplit(".", 1)[0]
|
||||||
|
else:
|
||||||
|
title = child['name']
|
||||||
|
if child['year']:
|
||||||
|
title += " (" + child['year'] + ")"
|
||||||
|
title += quality
|
||||||
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url,
|
||||||
|
server="", thumbnail=thumbnail, fanart=fanart, fulltitle=fulltitle, infoLabels=infolabels,
|
||||||
|
contentSerieName=fulltitle, context="25", viewmode="movie_with_plot", folder=True))
|
||||||
|
if item.extra == "new":
|
||||||
|
itemlist.sort(key=lambda item: item.title, reverse=True)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def episodios(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
# Redirección para actualización de videoteca
|
||||||
|
if item.extra == "series_library":
|
||||||
|
itemlist = series_library(item)
|
||||||
|
return itemlist
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
# Se prueba un método u otro porque algunas series no están bien listadas
|
||||||
|
if data["sortedRepoChilds"]:
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
if item.infoLabels:
|
||||||
|
item.infoLabels['duration'] = str(child['duration'])
|
||||||
|
item.infoLabels['season'] = str(data['seasonNumber'])
|
||||||
|
item.infoLabels['episode'] = str(child['episode'])
|
||||||
|
item.infoLabels['mediatype'] = "episode"
|
||||||
|
#contentTitle = item.fulltitle + "|" + str(data['seasonNumber']) + "|" + str(child['episode'])
|
||||||
|
# En caso de venir del apartado nuevos capítulos se redirige a la función series para mostrar los demás
|
||||||
|
if item.title == "Nuevos Capítulos":
|
||||||
|
url = host + "/json/playlist/%s/index.json" % child["season"]
|
||||||
|
action = "series"
|
||||||
|
extra = "new"
|
||||||
|
else:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
action = "findvideos"
|
||||||
|
extra = ""
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
thumbnail = host + "/json/repo/%s/thumbnail.jpg" % child["id"]
|
||||||
|
try:
|
||||||
|
title = fulltitle = child['name'].rsplit(" ", 1)[0] + " - " + child['name'].rsplit(" ", 1)[1]
|
||||||
|
except:
|
||||||
|
title = fulltitle = child['id']
|
||||||
|
itemlist.append(item.clone(action=action, server="", title=title, url=url, thumbnail=thumbnail,
|
||||||
|
fanart=item.fanart, fulltitle=fulltitle, contentSerieName=fulltitle, context="35",
|
||||||
|
viewmode="movie", extra=extra, show=item.fulltitle, folder=True))
|
||||||
|
else:
|
||||||
|
for child in data["repoChilds"]:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child
|
||||||
|
if data['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child
|
||||||
|
else:
|
||||||
|
thumbnail = host + "/json/repo/%s/thumbnail.jpg" % child
|
||||||
|
title = fulltitle = child.capitalize().replace('_', ' ')
|
||||||
|
itemlist.append(item.clone(action="findvideos", server="", title=title, url=url, thumbnail=thumbnail,
|
||||||
|
fanart=item.fanart, fulltitle=fulltitle, contentSerieName=item.fulltitle,
|
||||||
|
context="25", show=item.fulltitle, folder=True))
|
||||||
|
# Opción de añadir a la videoteca en casos de series de una única temporada
|
||||||
|
if len(itemlist) > 0 and not "---" in item.title and item.title != "Nuevos Capítulos":
|
||||||
|
if config.get_videolibrary_support() and item.show == "":
|
||||||
|
if "-" in item.title:
|
||||||
|
show = item.title.split('-')[0]
|
||||||
|
else:
|
||||||
|
show = item.title.split('(')[0]
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", text_color="green",
|
||||||
|
url=item.url, action="add_serie_to_library", show=show, extra="series_library"))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def series_library(item):
|
||||||
|
logger.info()
|
||||||
|
# Funcion unicamente para añadir/actualizar series a la libreria
|
||||||
|
lista_episodios = []
|
||||||
|
show = item.show.strip()
|
||||||
|
data_serie = anti_cloudflare(item.url, host=host, headers=headers)
|
||||||
|
data_serie = jsontools.load(data_serie)
|
||||||
|
# Para series que en la web se listan divididas por temporadas
|
||||||
|
if data_serie["sortedPlaylistChilds"]:
|
||||||
|
for season_name in data_serie["sortedPlaylistChilds"]:
|
||||||
|
url_season = host + "/json/playlist/%s/index.json" % season_name['id']
|
||||||
|
data = anti_cloudflare(url_season, host=host, headers=headers)
|
||||||
|
data = jsontools.load(data)
|
||||||
|
if data["sortedRepoChilds"]:
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
fulltitle = child['name'].rsplit(" ", 1)[0] + " - " + child['name'].rsplit(" ", 1)[1]
|
||||||
|
try:
|
||||||
|
check_filename = scrapertools.get_season_and_episode(fulltitle)
|
||||||
|
except:
|
||||||
|
fulltitle += " " + str(data['seasonNumber']) + "x00"
|
||||||
|
lista_episodios.append(Item(channel=item.channel, action="findvideos", server="",
|
||||||
|
title=fulltitle, extra=url, url=item.url, fulltitle=fulltitle,
|
||||||
|
contentTitle=fulltitle, show=show))
|
||||||
|
else:
|
||||||
|
for child in data["repoChilds"]:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child
|
||||||
|
fulltitle = child.capitalize().replace('_', ' ')
|
||||||
|
try:
|
||||||
|
check_filename = scrapertools.get_season_and_episode(fulltitle)
|
||||||
|
except:
|
||||||
|
fulltitle += " " + str(data['seasonNumber']) + "x00"
|
||||||
|
lista_episodios.append(Item(channel=item.channel, action="findvideos", server="",
|
||||||
|
title=fulltitle, extra=url, url=item.url, contentTitle=fulltitle,
|
||||||
|
fulltitle=fulltitle, show=show))
|
||||||
|
# Para series directas de una sola temporada
|
||||||
|
else:
|
||||||
|
data = data_serie
|
||||||
|
if data["sortedRepoChilds"]:
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
fulltitle = child['name'].rsplit(" ", 1)[0] + " - " + child['name'].rsplit(" ", 1)[1]
|
||||||
|
try:
|
||||||
|
check_filename = scrapertools.get_season_and_episode(fulltitle)
|
||||||
|
except:
|
||||||
|
fulltitle += " 1x00"
|
||||||
|
lista_episodios.append(Item(channel=item.channel, action="findvideos", server="", title=fulltitle,
|
||||||
|
contentTitle=fulltitle, url=item.url, extra=url, fulltitle=fulltitle,
|
||||||
|
show=show))
|
||||||
|
else:
|
||||||
|
for child in data["repoChilds"]:
|
||||||
|
url = host + "/json/repo/%s/index.json" % child
|
||||||
|
fulltitle = child.capitalize().replace('_', ' ')
|
||||||
|
try:
|
||||||
|
check_filename = scrapertools.get_season_and_episode(fulltitle)
|
||||||
|
except:
|
||||||
|
fulltitle += " 1x00"
|
||||||
|
lista_episodios.append(Item(channel=item.channel, action="findvideos", server="", title=fulltitle,
|
||||||
|
contentTitle=fulltitle, url=item.url, extra=url, fulltitle=fulltitle,
|
||||||
|
show=show))
|
||||||
|
return lista_episodios
|
||||||
|
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
# En caso de llamarse a la función desde una serie de la videoteca
|
||||||
|
if item.extra.startswith("http"): item.url = item.extra
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
id = urllib.quote(data['id'])
|
||||||
|
for child in data["profiles"].keys():
|
||||||
|
videopath = urllib.quote(data["profiles"][child]['videoUri'])
|
||||||
|
for i in range(0, len(data["profiles"][child]['servers'])):
|
||||||
|
url = data["profiles"][child]['servers'][i]['url'] + videopath
|
||||||
|
size = " " + data["profiles"][child]["sizeHuman"]
|
||||||
|
resolution = " [" + (data["profiles"][child]['videoResolution']) + "]"
|
||||||
|
title = "Ver vídeo en " + resolution.replace('1920x1080', 'HD-1080p')
|
||||||
|
if i == 0:
|
||||||
|
title += size + " [COLOR purple]Mirror " + str(i + 1) + "[/COLOR]"
|
||||||
|
else:
|
||||||
|
title += size + " [COLOR green]Mirror " + str(i + 1) + "[/COLOR]"
|
||||||
|
# Para poner enlaces de mayor calidad al comienzo de la lista
|
||||||
|
if data["profiles"][child]["profileId"] == "default":
|
||||||
|
itemlist.insert(i, item.clone(action="play", server="directo", title=title, url=url,
|
||||||
|
viewmode="list", extra=id, folder=False))
|
||||||
|
else:
|
||||||
|
itemlist.append(item.clone(action="play", server="directo", title=title, url=url,
|
||||||
|
viewmode="list", extra=id, folder=False))
|
||||||
|
itemlist.append(item.clone(channel="trailertools", action="buscartrailer", title="Buscar Tráiler",
|
||||||
|
text_color="magenta"))
|
||||||
|
if len(itemlist) > 0 and item.extra == "":
|
||||||
|
if config.get_videolibrary_support():
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir enlaces a la videoteca", text_color="green",
|
||||||
|
url=item.url, action="add_pelicula_to_library",
|
||||||
|
infoLabels={'title':item.fulltitle}, extra="findvideos", fulltitle=item.fulltitle))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def play(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
uri = scrapertools.find_single_match(item.url, '(/transcoder[\w\W]+)')
|
||||||
|
uri_request = host + "/video-prod/s/uri?uri=%s&_=%s" % (uri, int(time.time()))
|
||||||
|
data = httptools.downloadpage(uri_request).data
|
||||||
|
data = jsontools.load(data)
|
||||||
|
url = item.url.replace(".tv-vip.com/transcoder/", ".tv-vip.info/c/transcoder/") + "?tt=" + str(data['tt']) + \
|
||||||
|
"&mm=" + data['mm'] + "&bb=" + data['bb']
|
||||||
|
itemlist.append(item.clone(action="play", server="directo", url=url, folder=False))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def listas(item):
|
||||||
|
logger.info()
|
||||||
|
# Para añadir listas a la videoteca en carpeta CINE
|
||||||
|
itemlist = []
|
||||||
|
data = anti_cloudflare(item.url, host=host, headers=headers)
|
||||||
|
data = jsontools.load(data)
|
||||||
|
head = header_string + get_cookie_value()
|
||||||
|
for child in data["sortedRepoChilds"]:
|
||||||
|
infolabels = {}
|
||||||
|
# Fanart
|
||||||
|
if child['hashBackground']:
|
||||||
|
fanart = host + "/json/repo/%s/background.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
fanart = host + "/json/repo/%s/thumbnail.jpg" % child["id"]
|
||||||
|
# Thumbnail
|
||||||
|
if child['hasPoster']:
|
||||||
|
thumbnail = host + "/json/repo/%s/poster.jpg" % child["id"]
|
||||||
|
else:
|
||||||
|
thumbnail = fanart
|
||||||
|
thumbnail += head
|
||||||
|
fanart += head
|
||||||
|
url = host + "/json/repo/%s/index.json" % child["id"]
|
||||||
|
if child['name'] == "":
|
||||||
|
title = scrapertools.slugify(child['id'].rsplit(".", 1)[0])
|
||||||
|
else:
|
||||||
|
title = scrapertools.slugify(child['name'])
|
||||||
|
title = title.replace('-', ' ').replace('_', ' ').capitalize()
|
||||||
|
infolabels['title'] = title
|
||||||
|
try:
|
||||||
|
from core import videolibrarytools
|
||||||
|
new_item = item.clone(title=title, url=url, fulltitle=title, fanart=fanart, extra="findvideos",
|
||||||
|
thumbnail=thumbnail, infoLabels=infolabels, category="Cine")
|
||||||
|
videolibrarytools.library.add_movie(new_item)
|
||||||
|
error = False
|
||||||
|
except:
|
||||||
|
error = True
|
||||||
|
import traceback
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
|
if not error:
|
||||||
|
itemlist.append(Item(channel=item.channel, title='Lista añadida correctamente a la videoteca',
|
||||||
|
action="", folder=False))
|
||||||
|
else:
|
||||||
|
itemlist.append(Item(channel=item.channel, title='ERROR. Han ocurrido uno o varios errores en el proceso',
|
||||||
|
action="", folder=False))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import re
|
|
||||||
import urlparse
|
|
||||||
|
|
||||||
from core import httptools
|
|
||||||
from core import scrapertools
|
|
||||||
from core.item import Item
|
|
||||||
from platformcode import logger
|
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Ultimos capítulos", action="ultimos", url="http://www.vertelenovelas.cc/",
|
|
||||||
viewmode="movie"))
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search"))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def search(item, texto):
|
|
||||||
logger.info()
|
|
||||||
texto = texto.replace(" ", "+")
|
|
||||||
item.url = "http://www.vertelenovelas.cc/ajax/autocompletex.php?q=" + texto
|
|
||||||
try:
|
|
||||||
return series(item)
|
|
||||||
|
|
||||||
# Se captura la excepciÛn, para no interrumpir al buscador global si un canal falla
|
|
||||||
except:
|
|
||||||
import sys
|
|
||||||
for line in sys.exc_info():
|
|
||||||
logger.error("%s" % line)
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def ultimos(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = '<article.*?</article>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
for match in matches:
|
|
||||||
title = scrapertools.find_single_match(match, '<span>([^<]+)</span>')
|
|
||||||
if title == "":
|
|
||||||
title = scrapertools.find_single_match(match, '<a href="[^"]+" class="title link">([^<]+)</a>')
|
|
||||||
url = urlparse.urljoin(item.url, scrapertools.find_single_match(match, '<a href="([^"]+)"'))
|
|
||||||
thumbnail = scrapertools.find_single_match(match, '<div data-src="([^"]+)"')
|
|
||||||
if thumbnail == "":
|
|
||||||
thumbnail = scrapertools.find_single_match(match, '<img src="([^"]+)"')
|
|
||||||
logger.debug("title=[" + title + "], url=[" + url + "]")
|
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail))
|
|
||||||
|
|
||||||
next_page_url = scrapertools.find_single_match(data, '<a href="([^"]+)" class="next">')
|
|
||||||
if next_page_url != "":
|
|
||||||
itemlist.append(Item(channel=item.channel, action="series", title=">> Pagina siguiente",
|
|
||||||
url=urlparse.urljoin(item.url, next_page_url), viewmode="movie", thumbnail="", plot="",
|
|
||||||
folder=True))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def series(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = '<article.*?</article>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
for match in matches:
|
|
||||||
title = scrapertools.find_single_match(match, '<span>([^<]+)</span>')
|
|
||||||
if title == "":
|
|
||||||
title = scrapertools.find_single_match(match, '<a href="[^"]+" class="title link">([^<]+)</a>')
|
|
||||||
url = urlparse.urljoin(item.url, scrapertools.find_single_match(match, '<a href="([^"]+)"'))
|
|
||||||
thumbnail = scrapertools.find_single_match(match, '<div data-src="([^"]+)"')
|
|
||||||
if thumbnail == "":
|
|
||||||
thumbnail = scrapertools.find_single_match(match, '<img src="([^"]+)"')
|
|
||||||
logger.debug("title=[" + title + "], url=[" + url + "]")
|
|
||||||
itemlist.append(Item(channel=item.channel, action="episodios", title=title, url=url, thumbnail=thumbnail))
|
|
||||||
next_page_url = scrapertools.find_single_match(data, '<a href="([^"]+)" class="next">')
|
|
||||||
if next_page_url != "":
|
|
||||||
itemlist.append(Item(channel=item.channel, action="series", title=">> Pagina siguiente",
|
|
||||||
url=urlparse.urljoin(item.url, next_page_url), viewmode="movie", thumbnail="", plot="",
|
|
||||||
folder=True))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = scrapertools.find_single_match(data, '<h2>Cap(.*?)</ul>')
|
|
||||||
patron = '<li><a href="([^"]+)"><span>([^<]+)</span></a>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
title = scrapertools.htmlclean(scrapedtitle)
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, action="findvideos", title=title, url=url,
|
|
||||||
folder=True, fulltitle=title))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
|
||||||
logger.info()
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
pattern = 'data-id="([^"]+)"'
|
|
||||||
list_servers = re.compile(pattern, re.DOTALL).findall(data)
|
|
||||||
list_urls = []
|
|
||||||
for _id in list_servers:
|
|
||||||
post = "id=%s" % _id
|
|
||||||
data = httptools.downloadpage("http://www.vertelenovelas.cc/goto/", post=post).data
|
|
||||||
list_urls.append(scrapertools.find_single_match(data, 'document\.location = "([^"]+)";'))
|
|
||||||
from core import servertools
|
|
||||||
itemlist = servertools.find_video_items(data=", ".join(list_urls))
|
|
||||||
for videoitem in itemlist:
|
|
||||||
# videoitem.title = item.title
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
return itemlist
|
|
||||||
@@ -410,8 +410,7 @@ def findvideos(item):
|
|||||||
if config.get_setting("quit_channel_name", "videolibrary") == 0:
|
if config.get_setting("quit_channel_name", "videolibrary") == 0:
|
||||||
server.title = "%s: %s" % (nom_canal.capitalize(), server.title)
|
server.title = "%s: %s" % (nom_canal.capitalize(), server.title)
|
||||||
|
|
||||||
server.infoLabels = item_json.infoLabels
|
#server.infoLabels = item_json.infoLabels
|
||||||
|
|
||||||
if not server.thumbnail:
|
if not server.thumbnail:
|
||||||
server.thumbnail = item.thumbnail
|
server.thumbnail = item.thumbnail
|
||||||
|
|
||||||
|
|||||||
@@ -716,6 +716,7 @@ def check_list_links(itemlist, numero):
|
|||||||
if numero > 0 and it.server != '' and it.url != '':
|
if numero > 0 and it.server != '' and it.url != '':
|
||||||
verificacion = check_video_link(it.url, it.server)
|
verificacion = check_video_link(it.url, it.server)
|
||||||
it.title = verificacion + ', ' + it.title.strip()
|
it.title = verificacion + ', ' + it.title.strip()
|
||||||
|
it.alive = verificacion
|
||||||
numero -= 1
|
numero -= 1
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -1,227 +1,453 @@
|
|||||||
# -*- coding: utf-8 -*-
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
try:
|
|
||||||
from selenium.webdriver import PhantomJS
|
try:
|
||||||
from contextlib import closing
|
from urllib.parse import urlsplit, urlparse, parse_qs, urljoin
|
||||||
|
except:
|
||||||
linkbucks_support = True
|
from urlparse import urlsplit, urlparse, parse_qs, urljoin
|
||||||
except:
|
|
||||||
linkbucks_support = False
|
import json
|
||||||
try:
|
import os
|
||||||
from urllib.request import urlsplit, urlparse
|
import re
|
||||||
except:
|
import time
|
||||||
from urlparse import urlsplit, urlparse
|
import urllib
|
||||||
import json
|
from base64 import b64decode
|
||||||
import os
|
from platformcode import logger
|
||||||
import re
|
|
||||||
import time
|
import xbmc
|
||||||
from base64 import b64decode
|
|
||||||
|
from core import httptools
|
||||||
import requests
|
|
||||||
|
|
||||||
|
def find_in_text(regex, text, flags=re.IGNORECASE | re.DOTALL):
|
||||||
class UnshortenIt(object):
|
rec = re.compile(regex, flags=flags)
|
||||||
_headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
match = rec.search(text)
|
||||||
'Accept-Encoding': 'gzip,deflate,sdch',
|
if not match:
|
||||||
'Accept-Language': 'en-US,en;q=0.8',
|
return False
|
||||||
'Connection': 'keep-alive',
|
return match.group(1)
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36'}
|
|
||||||
_adfly_regex = r'adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy'
|
|
||||||
_linkbucks_regex = r'linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co'
|
class UnshortenIt(object):
|
||||||
_adfocus_regex = r'adfoc\.us'
|
_adfly_regex = r'adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|threadsphere\.bid|restorecosm\.bid'
|
||||||
_lnxlu_regex = r'lnx\.lu'
|
_linkbucks_regex = r'linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co'
|
||||||
_shst_regex = r'sh\.st'
|
_adfocus_regex = r'adfoc\.us'
|
||||||
_this_dir, _this_filename = os.path.split(__file__)
|
_lnxlu_regex = r'lnx\.lu'
|
||||||
_timeout = 10
|
_shst_regex = r'sh\.st'
|
||||||
|
_hrefli_regex = r'href\.li'
|
||||||
def unshorten(self, uri, type=None, timeout=10):
|
_anonymz_regex = r'anonymz\.com'
|
||||||
domain = urlsplit(uri).netloc
|
_shrink_service_regex = r'shrink-service\.it'
|
||||||
self._timeout = timeout
|
_rapidcrypt_regex = r'rapidcrypt\.net'
|
||||||
|
|
||||||
if re.search(self._adfly_regex, domain, re.IGNORECASE) or type == 'adfly':
|
_maxretries = 5
|
||||||
return self._unshorten_adfly(uri)
|
|
||||||
if re.search(self._adfocus_regex, domain, re.IGNORECASE) or type == 'adfocus':
|
_this_dir, _this_filename = os.path.split(__file__)
|
||||||
return self._unshorten_adfocus(uri)
|
_timeout = 10
|
||||||
if re.search(self._linkbucks_regex, domain, re.IGNORECASE) or type == 'linkbucks':
|
|
||||||
if linkbucks_support:
|
def unshorten(self, uri, type=None):
|
||||||
return self._unshorten_linkbucks(uri)
|
|
||||||
else:
|
domain = urlsplit(uri).netloc
|
||||||
return uri, 'linkbucks.com not supported. Install selenium package to add support.'
|
|
||||||
if re.search(self._lnxlu_regex, domain, re.IGNORECASE) or type == 'lnxlu':
|
if not domain:
|
||||||
return self._unshorten_lnxlu(uri)
|
return uri, "No domain found in URI!"
|
||||||
if re.search(self._shst_regex, domain, re.IGNORECASE):
|
|
||||||
return self._unshorten_shst(uri)
|
had_google_outbound, uri = self._clear_google_outbound_proxy(uri)
|
||||||
|
|
||||||
try:
|
if re.search(self._adfly_regex, domain,
|
||||||
# headers stop t.co from working so omit headers if this is a t.co link
|
re.IGNORECASE) or type == 'adfly':
|
||||||
if domain == 't.co':
|
return self._unshorten_adfly(uri)
|
||||||
r = requests.get(uri, timeout=self._timeout)
|
if re.search(self._adfocus_regex, domain,
|
||||||
return r.url, r.status_code
|
re.IGNORECASE) or type == 'adfocus':
|
||||||
# p.ost.im uses meta http refresh to redirect.
|
return self._unshorten_adfocus(uri)
|
||||||
if domain == 'p.ost.im':
|
if re.search(self._linkbucks_regex, domain,
|
||||||
r = requests.get(uri, headers=self._headers, timeout=self._timeout)
|
re.IGNORECASE) or type == 'linkbucks':
|
||||||
uri = re.findall(r'.*url\=(.*?)\"\.*', r.text)[0]
|
return self._unshorten_linkbucks(uri)
|
||||||
return uri, 200
|
if re.search(self._lnxlu_regex, domain,
|
||||||
r = requests.head(uri, headers=self._headers, timeout=self._timeout)
|
re.IGNORECASE) or type == 'lnxlu':
|
||||||
while True:
|
return self._unshorten_lnxlu(uri)
|
||||||
if 'location' in r.headers:
|
if re.search(self._shrink_service_regex, domain, re.IGNORECASE):
|
||||||
r = requests.head(r.headers['location'])
|
return self._unshorten_shrink_service(uri)
|
||||||
uri = r.url
|
if re.search(self._shst_regex, domain, re.IGNORECASE):
|
||||||
else:
|
return self._unshorten_shst(uri)
|
||||||
return r.url, r.status_code
|
if re.search(self._hrefli_regex, domain, re.IGNORECASE):
|
||||||
|
return self._unshorten_hrefli(uri)
|
||||||
except Exception as e:
|
if re.search(self._anonymz_regex, domain, re.IGNORECASE):
|
||||||
return uri, str(e)
|
return self._unshorten_anonymz(uri)
|
||||||
|
if re.search(self._rapidcrypt_regex, domain, re.IGNORECASE):
|
||||||
def _unshorten_adfly(self, uri):
|
return self._unshorten_rapidcrypt(uri)
|
||||||
|
|
||||||
try:
|
return uri, 200
|
||||||
r = requests.get(uri, headers=self._headers, timeout=self._timeout)
|
|
||||||
html = r.text
|
def unwrap_30x(self, uri, timeout=10):
|
||||||
ysmm = re.findall(r"var ysmm =.*\;?", html)
|
|
||||||
|
domain = urlsplit(uri).netloc
|
||||||
if len(ysmm) > 0:
|
self._timeout = timeout
|
||||||
ysmm = re.sub(r'var ysmm \= \'|\'\;', '', ysmm[0])
|
|
||||||
|
loop_counter = 0
|
||||||
left = ''
|
try:
|
||||||
right = ''
|
|
||||||
|
if loop_counter > 5:
|
||||||
for c in [ysmm[i:i + 2] for i in range(0, len(ysmm), 2)]:
|
raise ValueError("Infinitely looping redirect from URL: '%s'" %
|
||||||
left += c[0]
|
(uri,))
|
||||||
right = c[1] + right
|
|
||||||
|
# headers stop t.co from working so omit headers if this is a t.co link
|
||||||
decoded_uri = b64decode(left.encode() + right.encode())[2:].decode()
|
if domain == 't.co':
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
if re.search(r'go\.php\?u\=', decoded_uri):
|
return r.url, r.code
|
||||||
decoded_uri = b64decode(re.sub(r'(.*?)u=', '', decoded_uri)).decode()
|
# p.ost.im uses meta http refresh to redirect.
|
||||||
|
if domain == 'p.ost.im':
|
||||||
return decoded_uri, r.status_code
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
else:
|
uri = re.findall(r'.*url\=(.*?)\"\.*', r.data)[0]
|
||||||
return uri, 'No ysmm variable found'
|
return uri, r.code
|
||||||
|
else:
|
||||||
except Exception as e:
|
|
||||||
return uri, str(e)
|
while True:
|
||||||
|
r = httptools.downloadpage(
|
||||||
def _unshorten_linkbucks(self, uri):
|
uri,
|
||||||
try:
|
timeout=self._timeout,
|
||||||
with closing(PhantomJS(
|
follow_redirects=False,
|
||||||
service_log_path=os.path.dirname(os.path.realpath(__file__)) + '/ghostdriver.log')) as browser:
|
only_headers=True)
|
||||||
browser.get(uri)
|
if not r.success:
|
||||||
|
return uri, -1
|
||||||
# wait 5 seconds
|
|
||||||
time.sleep(5)
|
retries = 0
|
||||||
|
if 'location' in r.headers and retries < self._maxretries:
|
||||||
page_source = browser.page_source
|
r = httptools.downloadpage(
|
||||||
|
r.headers['location'],
|
||||||
link = re.findall(r'skiplink(.*?)\>', page_source)
|
follow_redirects=False,
|
||||||
if link is not None:
|
only_headers=True)
|
||||||
link = re.sub(r'\shref\=|\"', '', link[0])
|
uri = r.url
|
||||||
if link == '':
|
loop_counter += 1
|
||||||
return uri, 'Failed to extract link.'
|
retries = retries + 1
|
||||||
return link, 200
|
else:
|
||||||
else:
|
return r.url, r.code
|
||||||
return uri, 'Failed to extract link.'
|
|
||||||
|
except Exception as e:
|
||||||
except Exception as e:
|
return uri, str(e)
|
||||||
return uri, str(e)
|
|
||||||
|
def _clear_google_outbound_proxy(self, url):
|
||||||
def _unshorten_adfocus(self, uri):
|
'''
|
||||||
orig_uri = uri
|
So google proxies all their outbound links through a redirect so they can detect outbound links.
|
||||||
try:
|
This call strips them out if they are present.
|
||||||
http_header = {
|
|
||||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11",
|
This is useful for doing things like parsing google search results, or if you're scraping google
|
||||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
docs, where google inserts hit-counters on all outbound links.
|
||||||
"Accept-Language": "nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4",
|
'''
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
"Pragma": "no-cache"
|
# This is kind of hacky, because we need to check both the netloc AND
|
||||||
}
|
# part of the path. We could use urllib.parse.urlsplit, but it's
|
||||||
|
# easier and just as effective to use string checks.
|
||||||
r = requests.get(uri, headers=http_header, timeout=self._timeout)
|
if url.startswith("http://www.google.com/url?") or \
|
||||||
html = r.text
|
url.startswith("https://www.google.com/url?"):
|
||||||
|
|
||||||
adlink = re.findall("click_url =.*;", html)
|
qs = urlparse(url).query
|
||||||
|
query = parse_qs(qs)
|
||||||
if len(adlink) > 0:
|
|
||||||
uri = re.sub('^click_url = "|"\;$', '', adlink[0])
|
if "q" in query: # Google doc outbound links (maybe blogspot, too)
|
||||||
if re.search(r'http(s|)\://adfoc\.us/serve/skip/\?id\=', uri):
|
return True, query["q"].pop()
|
||||||
http_header = {
|
elif "url" in query: # Outbound links from google searches
|
||||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11",
|
return True, query["url"].pop()
|
||||||
"Accept-Encoding": "gzip,deflate,sdch",
|
else:
|
||||||
"Accept-Language": "en-US,en;,q=0.8",
|
raise ValueError(
|
||||||
"Connection": "keep-alive",
|
"Google outbound proxy URL without a target url ('%s')?" %
|
||||||
"Host": "adfoc.us",
|
url)
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
"Pragma": "no-cache",
|
return False, url
|
||||||
"Referer": orig_uri,
|
|
||||||
}
|
def _unshorten_adfly(self, uri):
|
||||||
r = requests.get(uri, headers=http_header, timeout=self._timeout)
|
logger.info()
|
||||||
|
try:
|
||||||
uri = r.url
|
r = httptools.downloadpage(
|
||||||
return uri, r.status_code
|
uri, timeout=self._timeout, cookies=False)
|
||||||
else:
|
html = r.data
|
||||||
return uri, 'No click_url variable found'
|
ysmm = re.findall(r"var ysmm =.*\;?", html)
|
||||||
except Exception as e:
|
|
||||||
return uri, str(e)
|
if len(ysmm) > 0:
|
||||||
|
ysmm = re.sub(r'var ysmm \= \'|\'\;', '', ysmm[0])
|
||||||
def _unshorten_lnxlu(self, uri):
|
|
||||||
try:
|
left = ''
|
||||||
r = requests.get(uri, headers=self._headers, timeout=self._timeout)
|
right = ''
|
||||||
html = r.text
|
|
||||||
|
for c in [ysmm[i:i + 2] for i in range(0, len(ysmm), 2)]:
|
||||||
code = re.findall('/\?click\=(.*)\."', html)
|
left += c[0]
|
||||||
|
right = c[1] + right
|
||||||
if len(code) > 0:
|
|
||||||
payload = {'click': code[0]}
|
# Additional digit arithmetic
|
||||||
r = requests.get('http://lnx.lu/', params=payload, headers=self._headers, timeout=self._timeout)
|
encoded_uri = list(left + right)
|
||||||
return r.url, r.status_code
|
numbers = ((i, n) for i, n in enumerate(encoded_uri) if str.isdigit(n))
|
||||||
else:
|
for first, second in zip(numbers, numbers):
|
||||||
return uri, 'No click variable found'
|
xor = int(first[1]) ^ int(second[1])
|
||||||
except Exception as e:
|
if xor < 10:
|
||||||
return uri, str(e)
|
encoded_uri[first[0]] = str(xor)
|
||||||
|
|
||||||
def _unshorten_shst(self, uri):
|
decoded_uri = b64decode("".join(encoded_uri).encode())[16:-16].decode()
|
||||||
try:
|
|
||||||
r = requests.get(uri, headers=self._headers, timeout=self._timeout)
|
if re.search(r'go\.php\?u\=', decoded_uri):
|
||||||
html = r.text
|
decoded_uri = b64decode(re.sub(r'(.*?)u=', '', decoded_uri)).decode()
|
||||||
|
|
||||||
session_id = re.findall(r'sessionId\:(.*?)\"\,', html)
|
return decoded_uri, r.code
|
||||||
if len(session_id) > 0:
|
else:
|
||||||
session_id = re.sub(r'\s\"', '', session_id[0])
|
return uri, 'No ysmm variable found'
|
||||||
|
|
||||||
http_header = {
|
except Exception as e:
|
||||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11",
|
return uri, str(e)
|
||||||
"Accept-Encoding": "gzip,deflate,sdch",
|
|
||||||
"Accept-Language": "en-US,en;,q=0.8",
|
def _unshorten_linkbucks(self, uri):
|
||||||
"Connection": "keep-alive",
|
'''
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
(Attempt) to decode linkbucks content. HEAVILY based on the OSS jDownloader codebase.
|
||||||
"Host": "sh.st",
|
This has necessidated a license change.
|
||||||
"Referer": uri,
|
|
||||||
"Origin": "http://sh.st",
|
'''
|
||||||
"X-Requested-With": "XMLHttpRequest"
|
|
||||||
}
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
|
|
||||||
time.sleep(5)
|
firstGet = time.time()
|
||||||
|
|
||||||
payload = {'adSessionId': session_id, 'callback': 'c'}
|
baseloc = r.url
|
||||||
r = requests.get('http://sh.st/shortest-url/end-adsession', params=payload, headers=http_header,
|
|
||||||
timeout=self._timeout)
|
if "/notfound/" in r.url or \
|
||||||
response = r.content[6:-2].decode('utf-8')
|
"(>Link Not Found<|>The link may have been deleted by the owner|To access the content, you must complete a quick survey\.)" in r.data:
|
||||||
|
return uri, 'Error: Link not found or requires a survey!'
|
||||||
if r.status_code == 200:
|
|
||||||
resp_uri = json.loads(response)['destinationUrl']
|
link = None
|
||||||
if resp_uri is not None:
|
|
||||||
uri = resp_uri
|
content = r.data
|
||||||
else:
|
|
||||||
return uri, 'Error extracting url'
|
regexes = [
|
||||||
else:
|
r"<div id=\"lb_header\">.*?/a>.*?<a.*?href=\"(.*?)\".*?class=\"lb",
|
||||||
return uri, 'Error extracting url'
|
r"AdBriteInit\(\"(.*?)\"\)",
|
||||||
|
r"Linkbucks\.TargetUrl = '(.*?)';",
|
||||||
return uri, r.status_code
|
r"Lbjs\.TargetUrl = '(http://[^<>\"]*?)'",
|
||||||
|
r"src=\"http://static\.linkbucks\.com/tmpl/mint/img/lb\.gif\" /></a>.*?<a href=\"(.*?)\"",
|
||||||
except Exception as e:
|
r"id=\"content\" src=\"([^\"]*)",
|
||||||
return uri, str(e)
|
]
|
||||||
|
|
||||||
|
for regex in regexes:
|
||||||
def unshorten(uri, type=None, timeout=10):
|
if self.inValidate(link):
|
||||||
unshortener = UnshortenIt()
|
link = find_in_text(regex, content)
|
||||||
return unshortener.unshorten(uri, type, timeout)
|
|
||||||
|
if self.inValidate(link):
|
||||||
|
match = find_in_text(r"noresize=\"[0-9+]\" src=\"(http.*?)\"", content)
|
||||||
|
if match:
|
||||||
|
link = find_in_text(r"\"frame2\" frameborder.*?src=\"(.*?)\"", content)
|
||||||
|
|
||||||
|
if self.inValidate(link):
|
||||||
|
scripts = re.findall("(<script type=\"text/javascript\">[^<]+</script>)", content)
|
||||||
|
if not scripts:
|
||||||
|
return uri, "No script bodies found?"
|
||||||
|
|
||||||
|
js = False
|
||||||
|
|
||||||
|
for script in scripts:
|
||||||
|
# cleanup
|
||||||
|
script = re.sub(r"[\r\n\s]+\/\/\s*[^\r\n]+", "", script)
|
||||||
|
if re.search(r"\s*var\s*f\s*=\s*window\['init'\s*\+\s*'Lb'\s*\+\s*'js'\s*\+\s*''\];[\r\n\s]+", script):
|
||||||
|
js = script
|
||||||
|
|
||||||
|
if not js:
|
||||||
|
return uri, "Could not find correct script?"
|
||||||
|
|
||||||
|
token = find_in_text(r"Token\s*:\s*'([a-f0-9]{40})'", js)
|
||||||
|
if not token:
|
||||||
|
token = find_in_text(r"\?t=([a-f0-9]{40})", js)
|
||||||
|
|
||||||
|
assert token
|
||||||
|
|
||||||
|
authKeyMatchStr = r"A(?:'\s*\+\s*')?u(?:'\s*\+\s*')?t(?:'\s*\+\s*')?h(?:'\s*\+\s*')?K(?:'\s*\+\s*')?e(?:'\s*\+\s*')?y"
|
||||||
|
l1 = find_in_text(r"\s*params\['" + authKeyMatchStr + r"'\]\s*=\s*(\d+?);", js)
|
||||||
|
l2 = find_in_text(
|
||||||
|
r"\s*params\['" + authKeyMatchStr + r"'\]\s*=\s?params\['" + authKeyMatchStr + r"'\]\s*\+\s*(\d+?);",
|
||||||
|
js)
|
||||||
|
|
||||||
|
if any([not l1, not l2, not token]):
|
||||||
|
return uri, "Missing required tokens?"
|
||||||
|
|
||||||
|
authkey = int(l1) + int(l2)
|
||||||
|
|
||||||
|
p1_url = urljoin(baseloc, "/director/?t={tok}".format(tok=token))
|
||||||
|
r2 = httptools.downloadpage(p1_url, timeout=self._timeout)
|
||||||
|
|
||||||
|
p1_url = urljoin(baseloc, "/scripts/jquery.js?r={tok}&{key}".format(tok=token, key=l1))
|
||||||
|
r2_1 = httptools.downloadpage(p1_url, timeout=self._timeout)
|
||||||
|
|
||||||
|
time_left = 5.033 - (time.time() - firstGet)
|
||||||
|
xbmc.sleep(max(time_left, 0) * 1000)
|
||||||
|
|
||||||
|
p3_url = urljoin(baseloc, "/intermission/loadTargetUrl?t={tok}&aK={key}&a_b=false".format(tok=token,
|
||||||
|
key=str(authkey)))
|
||||||
|
r3 = httptools.downloadpage(p3_url, timeout=self._timeout)
|
||||||
|
|
||||||
|
resp_json = json.loads(r3.data)
|
||||||
|
if "Url" in resp_json:
|
||||||
|
return resp_json['Url'], r3.code
|
||||||
|
|
||||||
|
return "Wat", "wat"
|
||||||
|
|
||||||
|
def inValidate(self, s):
|
||||||
|
# Original conditional:
|
||||||
|
# (s == null || s != null && (s.matches("[\r\n\t ]+") || s.equals("") || s.equalsIgnoreCase("about:blank")))
|
||||||
|
if not s:
|
||||||
|
return True
|
||||||
|
|
||||||
|
if re.search("[\r\n\t ]+", s) or s.lower() == "about:blank":
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def _unshorten_adfocus(self, uri):
|
||||||
|
orig_uri = uri
|
||||||
|
try:
|
||||||
|
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
|
html = r.data
|
||||||
|
|
||||||
|
adlink = re.findall("click_url =.*;", html)
|
||||||
|
|
||||||
|
if len(adlink) > 0:
|
||||||
|
uri = re.sub('^click_url = "|"\;$', '', adlink[0])
|
||||||
|
if re.search(r'http(s|)\://adfoc\.us/serve/skip/\?id\=', uri):
|
||||||
|
http_header = dict()
|
||||||
|
http_header["Host"] = "adfoc.us"
|
||||||
|
http_header["Referer"] = orig_uri
|
||||||
|
|
||||||
|
r = httptools.downloadpage(uri, headers=http_header, timeout=self._timeout)
|
||||||
|
|
||||||
|
uri = r.url
|
||||||
|
return uri, r.code
|
||||||
|
else:
|
||||||
|
return uri, 'No click_url variable found'
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
def _unshorten_lnxlu(self, uri):
|
||||||
|
try:
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
|
html = r.data
|
||||||
|
|
||||||
|
code = re.findall('/\?click\=(.*)\."', html)
|
||||||
|
|
||||||
|
if len(code) > 0:
|
||||||
|
payload = {'click': code[0]}
|
||||||
|
r = httptools.downloadpage(
|
||||||
|
'http://lnx.lu?' + urllib.urlencode(payload),
|
||||||
|
timeout=self._timeout)
|
||||||
|
return r.url, r.code
|
||||||
|
else:
|
||||||
|
return uri, 'No click variable found'
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
def _unshorten_shst(self, uri):
|
||||||
|
try:
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout)
|
||||||
|
html = r.data
|
||||||
|
|
||||||
|
session_id = re.findall(r'sessionId\:(.*?)\"\,', html)
|
||||||
|
if len(session_id) > 0:
|
||||||
|
session_id = re.sub(r'\s\"', '', session_id[0])
|
||||||
|
|
||||||
|
http_header = dict()
|
||||||
|
http_header["Content-Type"] = "application/x-www-form-urlencoded"
|
||||||
|
http_header["Host"] = "sh.st"
|
||||||
|
http_header["Referer"] = uri
|
||||||
|
http_header["Origin"] = "http://sh.st"
|
||||||
|
http_header["X-Requested-With"] = "XMLHttpRequest"
|
||||||
|
|
||||||
|
xbmc.sleep(5 * 1000)
|
||||||
|
|
||||||
|
payload = {'adSessionId': session_id, 'callback': 'c'}
|
||||||
|
r = httptools.downloadpage(
|
||||||
|
'http://sh.st/shortest-url/end-adsession?' +
|
||||||
|
urllib.urlencode(payload),
|
||||||
|
headers=http_header,
|
||||||
|
timeout=self._timeout)
|
||||||
|
response = r.data[6:-2].decode('utf-8')
|
||||||
|
|
||||||
|
if r.code == 200:
|
||||||
|
resp_uri = json.loads(response)['destinationUrl']
|
||||||
|
if resp_uri is not None:
|
||||||
|
uri = resp_uri
|
||||||
|
else:
|
||||||
|
return uri, 'Error extracting url'
|
||||||
|
else:
|
||||||
|
return uri, 'Error extracting url'
|
||||||
|
|
||||||
|
return uri, r.code
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
def _unshorten_hrefli(self, uri):
|
||||||
|
try:
|
||||||
|
# Extract url from query
|
||||||
|
parsed_uri = urlparse(uri)
|
||||||
|
extracted_uri = parsed_uri.query
|
||||||
|
if not extracted_uri:
|
||||||
|
return uri, 200
|
||||||
|
# Get url status code
|
||||||
|
r = httptools.downloadpage(
|
||||||
|
extracted_uri,
|
||||||
|
timeout=self._timeout,
|
||||||
|
follow_redirects=False,
|
||||||
|
only_headers=True)
|
||||||
|
return r.url, r.code
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
def _unshorten_anonymz(self, uri):
|
||||||
|
# For the moment they use the same system as hrefli
|
||||||
|
return self._unshorten_hrefli(uri)
|
||||||
|
|
||||||
|
def _unshorten_shrink_service(self, uri):
|
||||||
|
try:
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout, cookies=False)
|
||||||
|
html = r.data
|
||||||
|
|
||||||
|
uri = re.findall(r"<input type='hidden' name='\d+' id='\d+' value='([^']+)'>", html)[0]
|
||||||
|
|
||||||
|
from core import scrapertools
|
||||||
|
uri = scrapertools.decodeHtmlentities(uri)
|
||||||
|
|
||||||
|
uri = uri.replace("/", "/") \
|
||||||
|
.replace(":", ":") \
|
||||||
|
.replace(".", ".") \
|
||||||
|
.replace("!", "!") \
|
||||||
|
.replace("#", "#") \
|
||||||
|
.replace("?", "?") \
|
||||||
|
.replace("_", "_")
|
||||||
|
|
||||||
|
return uri, r.code
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
def _unshorten_rapidcrypt(self, uri):
|
||||||
|
try:
|
||||||
|
r = httptools.downloadpage(uri, timeout=self._timeout, cookies=False)
|
||||||
|
html = r.data
|
||||||
|
|
||||||
|
uri = re.findall(r'<a class="button" href="([^"]+)">Click to continue</a>', html)[0]
|
||||||
|
|
||||||
|
return uri, r.code
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return uri, str(e)
|
||||||
|
|
||||||
|
|
||||||
|
def unwrap_30x_only(uri, timeout=10):
|
||||||
|
unshortener = UnshortenIt()
|
||||||
|
uri, status = unshortener.unwrap_30x(uri, timeout=timeout)
|
||||||
|
return uri, status
|
||||||
|
|
||||||
|
|
||||||
|
def unshorten_only(uri, type=None, timeout=10):
|
||||||
|
unshortener = UnshortenIt()
|
||||||
|
uri, status = unshortener.unshorten(uri, type=type)
|
||||||
|
return uri, status
|
||||||
|
|
||||||
|
|
||||||
|
def unshorten(uri, type=None, timeout=10):
|
||||||
|
unshortener = UnshortenIt()
|
||||||
|
uri, status = unshortener.unshorten(uri, type=type)
|
||||||
|
if status == 200:
|
||||||
|
uri, status = unshortener.unwrap_30x(uri, timeout=timeout)
|
||||||
|
return uri, status
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def start():
|
|||||||
funciones que deseamos que se ejecuten nada mas abrir el plugin.
|
funciones que deseamos que se ejecuten nada mas abrir el plugin.
|
||||||
"""
|
"""
|
||||||
logger.info()
|
logger.info()
|
||||||
|
config.set_setting('show_once', True)
|
||||||
# Test if all the required directories are created
|
# Test if all the required directories are created
|
||||||
config.verify_directories_created()
|
config.verify_directories_created()
|
||||||
|
|
||||||
@@ -51,6 +51,11 @@ def run(item=None):
|
|||||||
item.start = True;
|
item.start = True;
|
||||||
else:
|
else:
|
||||||
item = Item(channel="channelselector", action="getmainlist", viewmode="movie")
|
item = Item(channel="channelselector", action="getmainlist", viewmode="movie")
|
||||||
|
if config.get_setting('show_once'):
|
||||||
|
platformtools.dialog_ok('Alfa', 'Alfa recomienda para mejorar tu experiencia:',
|
||||||
|
'Palomitas, relajate y disfruta.')
|
||||||
|
config.set_setting('show_once', False)
|
||||||
|
|
||||||
logger.info(item.tostring())
|
logger.info(item.tostring())
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -310,6 +315,7 @@ def run(item=None):
|
|||||||
log_message)
|
log_message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def reorder_itemlist(itemlist):
|
def reorder_itemlist(itemlist):
|
||||||
logger.info()
|
logger.info()
|
||||||
# logger.debug("Inlet itemlist size: %i" % len(itemlist))
|
# logger.debug("Inlet itemlist size: %i" % len(itemlist))
|
||||||
|
|||||||
@@ -324,7 +324,9 @@ def title_format(item):
|
|||||||
# Si el titulo no tiene contentSerieName entonces se formatea como pelicula
|
# Si el titulo no tiene contentSerieName entonces se formatea como pelicula
|
||||||
item.title = '%s' % set_color(item.contentTitle, 'movie')
|
item.title = '%s' % set_color(item.contentTitle, 'movie')
|
||||||
if item.contentType=='movie':
|
if item.contentType=='movie':
|
||||||
item.context='Buscar esta pelicula en otros canales'
|
if item.context:
|
||||||
|
if isinstance(item.context, list):
|
||||||
|
item.context.append('Buscar esta pelicula en otros canales')
|
||||||
|
|
||||||
if 'Novedades' in item.category and item.from_channel=='news':
|
if 'Novedades' in item.category and item.from_channel=='news':
|
||||||
#logger.debug('novedades')
|
#logger.debug('novedades')
|
||||||
@@ -406,6 +408,7 @@ def title_format(item):
|
|||||||
if 'Activar' in item.context[1]['title']:
|
if 'Activar' in item.context[1]['title']:
|
||||||
item.title= '%s' % (set_color(item.title, 'no_update'))
|
item.title= '%s' % (set_color(item.title, 'no_update'))
|
||||||
|
|
||||||
|
#logger.debug('Despues del formato: %s' % item)
|
||||||
# Damos formato al servidor si existiera
|
# Damos formato al servidor si existiera
|
||||||
if item.server:
|
if item.server:
|
||||||
server = '%s' % set_color(item.server.strip().capitalize(), 'server')
|
server = '%s' % set_color(item.server.strip().capitalize(), 'server')
|
||||||
@@ -417,6 +420,7 @@ def title_format(item):
|
|||||||
if item.action != 'play' and item.server:
|
if item.action != 'play' and item.server:
|
||||||
item.title ='%s %s'%(item.title, server.strip())
|
item.title ='%s %s'%(item.title, server.strip())
|
||||||
elif item.action == 'play' and item.server:
|
elif item.action == 'play' and item.server:
|
||||||
|
|
||||||
if item.quality == 'default':
|
if item.quality == 'default':
|
||||||
quality = ''
|
quality = ''
|
||||||
#logger.debug('language_color: %s'%language_color)
|
#logger.debug('language_color: %s'%language_color)
|
||||||
@@ -424,6 +428,12 @@ def title_format(item):
|
|||||||
if lang:
|
if lang:
|
||||||
item.title = add_languages(item.title, simple_language)
|
item.title = add_languages(item.title, simple_language)
|
||||||
#logger.debug('item.title: %s' % item.title)
|
#logger.debug('item.title: %s' % item.title)
|
||||||
|
# si hay verificacion de enlaces
|
||||||
|
if item.alive != '':
|
||||||
|
if item.alive.lower() == 'no':
|
||||||
|
item.title = '[[COLOR red][B]X[/B][/COLOR]] %s' % item.title
|
||||||
|
elif item.alive == '??':
|
||||||
|
item.title = '[[COLOR yellow][B]?[/B][/COLOR]] %s' % item.title
|
||||||
else:
|
else:
|
||||||
item.title = '%s' % item.title
|
item.title = '%s' % item.title
|
||||||
#logger.debug('item.title despues de server: %s' % item.title)
|
#logger.debug('item.title despues de server: %s' % item.title)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "clipwatching.com/(.*?).html",
|
"pattern": "clipwatching.com/(\\w+)",
|
||||||
"url": "http://clipwatching.com/\\1.html"
|
"url": "http://clipwatching.com/\\1.html"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "https://.+.d0stream.com/embed/([a-z0-9]+)",
|
||||||
|
"url": "https://v.d0stream.com/embed/\\1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "dostream",
|
||||||
|
"name": "dostream",
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "black_list",
|
||||||
|
"label": "Incluir en lista negra",
|
||||||
|
"type": "bool",
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "favorites_servers_list",
|
||||||
|
"label": "Incluir en lista de favoritos",
|
||||||
|
"lvalues": [
|
||||||
|
"No",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5"
|
||||||
|
],
|
||||||
|
"type": "list",
|
||||||
|
"visible": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thumbnail": "https://s14.postimg.org/lczc08bsx/dostream.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Conector DoStream By Alfa development Group
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
import re
|
||||||
|
from core import httptools
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
|
||||||
|
data = httptools.downloadpage(page_url)
|
||||||
|
|
||||||
|
if data.code == 404:
|
||||||
|
return False, "[Dostream] El archivo no existe o ha sido borrado"
|
||||||
|
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
|
logger.info("url=" + page_url)
|
||||||
|
|
||||||
|
video_urls = []
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
|
logger.debug(data)
|
||||||
|
patron = "(?:'src'|'url'):'(http.*?)'"
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
for url in matches:
|
||||||
|
video_urls.append(['dostream',url])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
@@ -12,6 +12,8 @@ def test_video_exists(page_url):
|
|||||||
return False, "[Downace] El video ha sido borrado"
|
return False, "[Downace] El video ha sido borrado"
|
||||||
if "please+try+again+later." in data:
|
if "please+try+again+later." in data:
|
||||||
return False, "[Downace] Error de downace, no se puede generar el enlace al video"
|
return False, "[Downace] Error de downace, no se puede generar el enlace al video"
|
||||||
|
if "File has been removed due to inactivity" in data:
|
||||||
|
return False, "[Downace] El archivo ha sido removido por inactividad"
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "https://estream.to/embed-([a-z0-9]+).html",
|
||||||
|
"url": "https://estream.to/\\1.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "estream",
|
||||||
|
"name": "estream",
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "black_list",
|
||||||
|
"label": "Incluir en lista negra",
|
||||||
|
"type": "bool",
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "favorites_servers_list",
|
||||||
|
"label": "Incluir en lista de favoritos",
|
||||||
|
"lvalues": [
|
||||||
|
"No",
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"3",
|
||||||
|
"4",
|
||||||
|
"5"
|
||||||
|
],
|
||||||
|
"type": "list",
|
||||||
|
"visible": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"thumbnail": "https://s14.postimg.org/ibd54ayf5/estream.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Conector Estream By Alfa development Group
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
|
import re
|
||||||
|
from core import httptools
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
|
||||||
|
data = httptools.downloadpage(page_url)
|
||||||
|
|
||||||
|
if data.code == 404:
|
||||||
|
return False, "[Estream] El archivo no existe o ha sido borrado"
|
||||||
|
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
|
logger.info("url=" + page_url)
|
||||||
|
|
||||||
|
video_urls = []
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
|
patron = "<source src=([^ ]+) type='video/mp4' label='.*?x(.*?)'"
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
for url, quality in matches:
|
||||||
|
video_urls.append(["%sp [estream]" % quality, url])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
@@ -73,11 +73,11 @@ def get_video_url_anterior(page_url, premium=False, user="", password="", video_
|
|||||||
pfxfx = ""
|
pfxfx = ""
|
||||||
data = httptools.downloadpage(page_url, cookies=False).data
|
data = httptools.downloadpage(page_url, cookies=False).data
|
||||||
data = data.replace("\n","")
|
data = data.replace("\n","")
|
||||||
cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.ws/counter.cgi.*?[^(?:'|")]+)""")
|
cgi_counter = scrapertools.find_single_match(data, """(?is)src=.(https://www.flashx.bz/counter.cgi.*?[^(?:'|")]+)""")
|
||||||
cgi_counter = cgi_counter.replace("%0A","").replace("%22","")
|
cgi_counter = cgi_counter.replace("%0A","").replace("%22","")
|
||||||
playnow = scrapertools.find_single_match(data, 'https://www.flashx.ws/dl[^"]+')
|
playnow = scrapertools.find_single_match(data, 'https://www.flashx.bz/dl[^"]+')
|
||||||
# Para obtener el f y el fxfx
|
# Para obtener el f y el fxfx
|
||||||
js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.ws/js\w+/c\w+.*?[^(?:'|")]+)""")
|
js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//","/"), """(?is)(flashx.bz/js\w+/c\w+.*?[^(?:'|")]+)""")
|
||||||
data_fxfx = httptools.downloadpage(js_fxfx).data
|
data_fxfx = httptools.downloadpage(js_fxfx).data
|
||||||
mfxfx = scrapertools.find_single_match(data_fxfx, 'get.*?({.*?})').replace("'","").replace(" ","")
|
mfxfx = scrapertools.find_single_match(data_fxfx, 'get.*?({.*?})').replace("'","").replace(" ","")
|
||||||
matches = scrapertools.find_multiple_matches(mfxfx, '(\w+):(\w+)')
|
matches = scrapertools.find_multiple_matches(mfxfx, '(\w+):(\w+)')
|
||||||
@@ -87,7 +87,7 @@ def get_video_url_anterior(page_url, premium=False, user="", password="", video_
|
|||||||
logger.info("mfxfxfx2= %s" %pfxfx)
|
logger.info("mfxfxfx2= %s" %pfxfx)
|
||||||
if pfxfx == "":
|
if pfxfx == "":
|
||||||
pfxfx = "ss=yes&f=fail&fxfx=6"
|
pfxfx = "ss=yes&f=fail&fxfx=6"
|
||||||
coding_url = 'https://www.flashx.ws/flashx.php?%s' %pfxfx
|
coding_url = 'https://www.flashx.bz/flashx.php?%s' %pfxfx
|
||||||
# {f: 'y', fxfx: '6'}
|
# {f: 'y', fxfx: '6'}
|
||||||
bloque = scrapertools.find_single_match(data, '(?s)Form method="POST" action(.*?)span')
|
bloque = scrapertools.find_single_match(data, '(?s)Form method="POST" action(.*?)span')
|
||||||
flashx_id = scrapertools.find_single_match(bloque, 'name="id" value="([^"]+)"')
|
flashx_id = scrapertools.find_single_match(bloque, 'name="id" value="([^"]+)"')
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "(https://vidlox.(?:tv|me)/embed-.*?.html)",
|
"pattern": "(?i)(https://vidlox.(?:tv|me)/embed-.*?.html)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user