Merge branch 'master' of https://github.com/alfa-addon/addon
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.2.0" provider-name="Alfa Addon">
|
<addon id="plugin.video.alfa" name="Alfa" version="2.2.2" 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,19 @@
|
|||||||
</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]
|
||||||
» playmax » allcalidad
|
» maxipelis » peliculasaudiolatino
|
||||||
» cinetux » allpeliculas
|
» peliculasmx » peliscity
|
||||||
» pedropolis » pelisplanet
|
» repelis » seriesmeme
|
||||||
» flashx » gvideo
|
» seriesyonkis » verpeliculasnuevas
|
||||||
¤ selector de temas ¤ arreglos internos
|
» zonatorrent » kabagi/diskokosmico
|
||||||
|
» tiotorrent » allcalidad
|
||||||
|
» areadocumental » cinetux
|
||||||
|
» hdfull » newpct1
|
||||||
|
» ohpelis » animeyt
|
||||||
|
» flashx » kbagi
|
||||||
|
» gamovideo » vidup
|
||||||
|
¤ arreglos internos
|
||||||
|
[COLOR green]Gracias a [COLOR yellow]RIgodonius[/COLOR] por su colaboración en esta versión[/COLOR]
|
||||||
</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>
|
||||||
|
|||||||
@@ -92,9 +92,14 @@ def peliculas(item):
|
|||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for url, thumbnail, titulo, varios in matches:
|
for url, thumbnail, titulo, varios in matches:
|
||||||
idioma = scrapertools.find_single_match(varios, '(?s)Idioma.*?kinopoisk">([^<]+)')
|
idioma = scrapertools.find_single_match(varios, '(?s)Idioma.*?kinopoisk">([^<]+)')
|
||||||
|
number_idioma = scrapertools.find_single_match(idioma, '[0-9]')
|
||||||
|
mtitulo = titulo
|
||||||
|
if number_idioma != "":
|
||||||
|
idioma = ""
|
||||||
|
else:
|
||||||
|
mtitulo += " (" + idioma + ")"
|
||||||
year = scrapertools.find_single_match(varios, 'Año.*?kinopoisk">([^<]+)')
|
year = scrapertools.find_single_match(varios, 'Año.*?kinopoisk">([^<]+)')
|
||||||
year = scrapertools.find_single_match(year, '[0-9]{4}')
|
year = scrapertools.find_single_match(year, '[0-9]{4}')
|
||||||
mtitulo = titulo + " (" + idioma + ")"
|
|
||||||
if year:
|
if year:
|
||||||
mtitulo += " (" + year + ")"
|
mtitulo += " (" + year + ")"
|
||||||
item.infoLabels['year'] = int(year)
|
item.infoLabels['year'] = int(year)
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ CHANNEL_DEFAULT_HEADERS = [
|
|||||||
|
|
||||||
REGEX_NEXT_PAGE = r"class='current'>\d+?</li><li><a href=\"([^']+?)\""
|
REGEX_NEXT_PAGE = r"class='current'>\d+?</li><li><a href=\"([^']+?)\""
|
||||||
REGEX_TITLE = r'(?:bigChar_a" href=.+?>)(.+?)(?:</a>)'
|
REGEX_TITLE = r'(?:bigChar_a" href=.+?>)(.+?)(?:</a>)'
|
||||||
REGEX_THUMB = r'src="(http://media.animeflv\.me/uploads/thumbs/[^"]+?)"'
|
REGEX_THUMB = r'src="(http://media.animeflv\.co/uploads/thumbs/[^"]+?)"'
|
||||||
REGEX_PLOT = r'<span class="info">Línea de historia:</span><p><span>(.*?)</span>'
|
REGEX_PLOT = r'<span class="info">Línea de historia:</span><p><span>(.*?)</span>'
|
||||||
REGEX_URL = r'href="(http://animeflv\.me/Anime/[^"]+)">'
|
REGEX_URL = r'href="(http://animeflv\.co/Anime/[^"]+)">'
|
||||||
REGEX_SERIE = r'%s.+?%s([^<]+?)</a><p>(.+?)</p>' % (REGEX_THUMB, REGEX_URL)
|
REGEX_SERIE = r'%s.+?%s([^<]+?)</a><p>(.+?)</p>' % (REGEX_THUMB, REGEX_URL)
|
||||||
REGEX_EPISODE = r'href="(http://animeflv\.me/Ver/[^"]+?)">(?:<span.+?</script>)?(.+?)</a></td><td>(\d+/\d+/\d+)</td></tr>'
|
REGEX_EPISODE = r'href="(http://animeflv\.co/Ver/[^"]+?)">(?:<span.+?</script>)?(.+?)</a></td><td>(\d+/\d+/\d+)</td></tr>'
|
||||||
REGEX_GENERO = r'<a href="(http://animeflv\.me/genero/[^\/]+/)">([^<]+)</a>'
|
REGEX_GENERO = r'<a href="(http://animeflv\.co/genero/[^\/]+/)">([^<]+)</a>'
|
||||||
|
|
||||||
|
|
||||||
def get_url_contents(url):
|
def get_url_contents(url):
|
||||||
@@ -309,7 +309,7 @@ def findvideos(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
page_html = get_url_contents(item.url)
|
page_html = get_url_contents(item.url)
|
||||||
regex_api = r'http://player\.animeflv\.me/[^\"]+'
|
regex_api = r'http://player\.animeflv\.co/[^\"]+'
|
||||||
iframe_url = scrapertools.find_single_match(page_html, regex_api)
|
iframe_url = scrapertools.find_single_match(page_html, regex_api)
|
||||||
|
|
||||||
iframe_html = get_url_contents(iframe_url)
|
iframe_html = get_url_contents(iframe_url)
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"id": "animeyt",
|
||||||
|
"name": "AnimeYT",
|
||||||
|
"active": true,
|
||||||
|
"adult": false,
|
||||||
|
"language": "es",
|
||||||
|
"thumbnail": "http://i.imgur.com/dHpupFk.png",
|
||||||
|
"version": 1,
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"date": "17/05/2017",
|
||||||
|
"description": "Fix novedades y replace en findvideos"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": [
|
||||||
|
"anime"
|
||||||
|
],
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "include_in_global_search",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Incluir en busqueda global",
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "modo_grafico",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "información extra",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import re
|
||||||
|
import urlparse
|
||||||
|
|
||||||
|
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from core import servertools
|
||||||
|
from core.item import Item
|
||||||
|
from core import tmdb
|
||||||
|
from platformcode import config,logger
|
||||||
|
|
||||||
|
__modo_grafico__ = config.get_setting('modo_grafico', 'animeyt')
|
||||||
|
|
||||||
|
HOST = "http://animeyt.tv/"
|
||||||
|
|
||||||
|
def mainlist(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
itemlist = list()
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Novedades", action="novedades", url=HOST))
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Recientes", action="recientes", url=HOST))
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Alfabético", action="alfabetico", url=HOST))
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Búsqueda", action="search", url=urlparse.urljoin(HOST, "busqueda?terminos=")))
|
||||||
|
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def novedades(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = list()
|
||||||
|
if not item.pagina:
|
||||||
|
item.pagina = 0
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
patron_novedades = '<div class="capitulos-portada">[\s\S]+?<h2>Comentarios</h2>'
|
||||||
|
|
||||||
|
data_novedades = scrapertools.find_single_match(data, patron_novedades)
|
||||||
|
|
||||||
|
patron = 'href="([^"]+)"[\s\S]+?src="([^"]+)"[^<]+alt="([^"]+) (\d+)([^"]+)'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data_novedades, patron)
|
||||||
|
|
||||||
|
for url, img, scrapedtitle, eps, info in matches[item.pagina:item.pagina + 20]:
|
||||||
|
title = scrapedtitle + " " + "1x" + eps + info
|
||||||
|
title = title.replace("Sub Español", "").replace("sub español", "")
|
||||||
|
infoLabels = {'filtro': {"original_language": "ja"}.items()}
|
||||||
|
itemlist.append(Item(channel=item.channel, title=title, url=url, thumb=img, action="findvideos", contentTitle=scrapedtitle, contentSerieName=scrapedtitle, infoLabels=infoLabels, contentType="tvshow"))
|
||||||
|
try:
|
||||||
|
from core import tmdb
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||||
|
for it in itemlist:
|
||||||
|
it.thumbnail = it.thumb
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if len(matches) > item.pagina + 20:
|
||||||
|
pagina = item.pagina + 20
|
||||||
|
itemlist.append(item.clone(channel=item.channel, action="novedades", url=item.url, title=">> Página Siguiente", pagina=pagina))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def alfabetico(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
|
||||||
|
for letra in '0ABCDEFGHIJKLMNOPQRSTUVWXYZ':
|
||||||
|
titulo = letra
|
||||||
|
if letra == "0":
|
||||||
|
letra = "num"
|
||||||
|
itemlist.append(Item(channel=item.channel, action="recientes", title=titulo,
|
||||||
|
url=urlparse.urljoin(HOST, "animes?tipo=0&genero=0&anio=0&letra={letra}".format(letra=letra))))
|
||||||
|
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def search(item, texto):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
texto = texto.replace(" ","+")
|
||||||
|
item.url = item.url+texto
|
||||||
|
if texto!='':
|
||||||
|
return recientes(item)
|
||||||
|
|
||||||
|
|
||||||
|
def recientes(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
patron_recientes = '<article class="anime">[\s\S]+?</main>'
|
||||||
|
|
||||||
|
data_recientes = scrapertools.find_single_match(data, patron_recientes)
|
||||||
|
|
||||||
|
patron = '<a href="([^"]+)"[^<]+<img src="([^"]+)".+?js-synopsis-reduce">(.*?)<.*?<h3 class="anime__title">(.*?)<small>(.*?)</small>'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data_recientes, patron)
|
||||||
|
|
||||||
|
for url, thumbnail, plot, title, cat in matches:
|
||||||
|
itemlist.append(item.clone(title=title, url=url, action="episodios", show=title, thumbnail=thumbnail, plot=plot, cat=cat))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb = True)
|
||||||
|
|
||||||
|
paginacion = scrapertools.find_single_match(data, '<a class="pager__link icon-derecha last" href="([^"]+)"')
|
||||||
|
paginacion = scrapertools.decodeHtmlentities(paginacion)
|
||||||
|
|
||||||
|
if paginacion:
|
||||||
|
itemlist.append(Item(channel=item.channel, action="recientes", title=">> Página Siguiente", url=paginacion))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def episodios(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
|
|
||||||
|
patron = '<span class="icon-triangulo-derecha"></span>.*?<a href="([^"]+)">([^"]+) (\d+)'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
|
for url, scrapedtitle, episode in matches:
|
||||||
|
|
||||||
|
title = "1x" + episode + " " + "Episodio"
|
||||||
|
itemlist.append(item.clone(title=title, url=url, action='findvideos'))
|
||||||
|
|
||||||
|
if config.get_videolibrary_support:
|
||||||
|
itemlist.append(Item(channel=item.channel, title="Añadir serie a la biblioteca", url=item.url, action="add_serie_to_library", extra="episodios", show=item.show))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
duplicados = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
patron = 'Player\("(.*?)"'
|
||||||
|
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
|
for url in matches:
|
||||||
|
if "cldup" in url:
|
||||||
|
title = "Opcion Cldup"
|
||||||
|
if "chumi" in url:
|
||||||
|
title = "Opcion Chumi"
|
||||||
|
itemlist.append(item.clone(channel=item.channel, folder=False, title=title, action="play", url=url))
|
||||||
|
|
||||||
|
if item.extra != "library":
|
||||||
|
if config.get_videolibrary_support() and item.extra:
|
||||||
|
itemlist.append(item.clone(channel=item.channel, title="[COLOR yellow]Añadir pelicula a la videoteca[/COLOR]", url=item.url, action="add_pelicula_to_library", extra="library", contentTitle=item.show, contentType="movie"))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def player(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url, add_referer=True).data
|
||||||
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
|
|
||||||
|
url = scrapertools.find_single_match(data, 'sources: \[{file:\'(.*?)\'')
|
||||||
|
|
||||||
|
itemlist = servertools.find_video_items(data=data)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
@@ -23,12 +23,12 @@ def mainlist(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
item.text_color = color1
|
item.text_color = color1
|
||||||
itemlist.append(item.clone(title="Novedades", action="entradas",
|
itemlist.append(item.clone(title="Novedades", action="entradas",
|
||||||
url="http://www.area-documental.com/resultados-reciente.php?buscar=&genero=",
|
url= host + "/resultados-reciente.php?buscar=&genero=",
|
||||||
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
||||||
itemlist.append(item.clone(title="Destacados", action="entradas",
|
itemlist.append(item.clone(title="Destacados", action="entradas",
|
||||||
url="http://www.area-documental.com/resultados-destacados.php?buscar=&genero=",
|
url= host + "/resultados-destacados.php?buscar=&genero=",
|
||||||
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
||||||
itemlist.append(item.clone(title="Categorías", action="cat", url="http://www.area-documental.com/index.php",
|
itemlist.append(item.clone(title="Categorías", action="cat", url= host + "/index.php",
|
||||||
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
fanart="http://i.imgur.com/Q7fsFI6.png"))
|
||||||
itemlist.append(item.clone(title="Ordenados por...", action="indice", fanart="http://i.imgur.com/Q7fsFI6.png"))
|
itemlist.append(item.clone(title="Ordenados por...", action="indice", fanart="http://i.imgur.com/Q7fsFI6.png"))
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ def configuracion(item):
|
|||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info()
|
logger.info()
|
||||||
item.url = "http://www.area-documental.com/resultados.php?buscar=%s&genero=&x=0&y=0" % texto
|
item.url = host + "/resultados.php?buscar=%s&genero=&x=0&y=0" % texto
|
||||||
item.action = "entradas"
|
item.action = "entradas"
|
||||||
try:
|
try:
|
||||||
itemlist = entradas(item)
|
itemlist = entradas(item)
|
||||||
@@ -65,7 +65,7 @@ def newest(categoria):
|
|||||||
item = Item()
|
item = Item()
|
||||||
try:
|
try:
|
||||||
if categoria == "documentales":
|
if categoria == "documentales":
|
||||||
item.url = "http://www.area-documental.com/resultados-reciente.php?buscar=&genero="
|
item.url = host + "/resultados-reciente.php?buscar=&genero="
|
||||||
item.action = "entradas"
|
item.action = "entradas"
|
||||||
itemlist = entradas(item)
|
itemlist = entradas(item)
|
||||||
|
|
||||||
@@ -86,9 +86,9 @@ def indice(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(item.clone(title="Título", action="entradas",
|
itemlist.append(item.clone(title="Título", action="entradas",
|
||||||
url="http://www.area-documental.com/resultados-titulo.php?buscar=&genero="))
|
url= host + "/resultados-titulo.php?buscar=&genero="))
|
||||||
itemlist.append(item.clone(title="Año", action="entradas",
|
itemlist.append(item.clone(title="Año", action="entradas",
|
||||||
url="http://www.area-documental.com/resultados-anio.php?buscar=&genero="))
|
url= host + "/resultados-anio.php?buscar=&genero="))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -125,9 +125,13 @@ def entradas(item):
|
|||||||
data2 = ""
|
data2 = ""
|
||||||
data = data.replace("\n", "").replace("\t", "")
|
data = data.replace("\n", "").replace("\t", "")
|
||||||
|
|
||||||
patron = '<div id="peliculas">.*?<a href="([^"]+)".*?<img src="([^"]+)".*?' \
|
patron = '(?s)<div id="peliculas">.*?a href="([^"]+)".*?'
|
||||||
'target="_blank">(.*?)</a>(.*?)<p>(.*?)</p>' \
|
patron += '<img src="([^"]+)".*?'
|
||||||
'.*?</strong>: (.*?)<strong>.*?</strong>(.*?)</div>'
|
patron += 'target="_blank">(.*?)</a></span>'
|
||||||
|
patron += '(.*?)<p>'
|
||||||
|
patron += '(.*?)</p>.*?'
|
||||||
|
patron += '</strong>:(.*?)<strong>.*?'
|
||||||
|
patron += '</strong>(.*?)</div>'
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, year, scrapedplot, genero, extra in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, year, scrapedplot, genero, extra in matches:
|
||||||
infolab = {'plot': scrapedplot, 'genre': genero}
|
infolab = {'plot': scrapedplot, 'genre': genero}
|
||||||
@@ -200,6 +204,5 @@ def play(item):
|
|||||||
|
|
||||||
extension = item.url.rsplit("|", 1)[0][-4:]
|
extension = item.url.rsplit("|", 1)[0][-4:]
|
||||||
itemlist.append(['%s %s [directo]' % (extension, item.calidad), item.url, 0, subtitle])
|
itemlist.append(['%s %s [directo]' % (extension, item.calidad), item.url, 0, subtitle])
|
||||||
# itemlist.append(item.clone(subtitle=subtitle))
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ def peliculas(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)
|
||||||
logger.info(data)
|
|
||||||
|
|
||||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title.strip()
|
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title.strip()
|
||||||
patron += '<span class="icon-star2"></span>(.*?)/div>.*?' # rating
|
patron += '<span class="icon-star2"></span>(.*?)/div>.*?' # rating
|
||||||
@@ -144,14 +143,17 @@ def peliculas(item):
|
|||||||
contentTitle = scrapedtitle.partition(':')[0].partition(',')[0]
|
contentTitle = scrapedtitle.partition(':')[0].partition(',')[0]
|
||||||
title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (
|
title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (
|
||||||
scrapedtitle, year, quality)
|
scrapedtitle, year, quality)
|
||||||
|
thumb_id = scrapertools.find_single_match(scrapedthumbnail, '.*?\/uploads\/(.*?)-')
|
||||||
|
thumbnail = "/%s.jpg" % thumb_id
|
||||||
|
filtro_list = {"poster_path": thumbnail}
|
||||||
|
filtro_list = filtro_list.items()
|
||||||
|
|
||||||
itemlist.append(item.clone(channel=__channel__, action="findvideos", text_color=color3,
|
itemlist.append(item.clone(channel=__channel__, action="findvideos", text_color=color3,
|
||||||
url=scrapedurl, infoLabels={'year': year, 'rating': rating},
|
url=scrapedurl, infoLabels={'filtro':filtro_list},
|
||||||
contentTitle=contentTitle, thumbnail=scrapedthumbnail,
|
contentTitle=contentTitle, thumbnail=thumbnail,
|
||||||
title=title, context="buscar_trailer", quality = quality))
|
title=title, context="buscar_trailer", quality = quality))
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
|
||||||
|
|
||||||
if item.page + 20 < len(matches):
|
if item.page + 20 < len(matches):
|
||||||
itemlist.append(item.clone(page=item.page + 20,
|
itemlist.append(item.clone(page=item.page + 20,
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ def get_enlaces(item, url, type):
|
|||||||
if servertools.is_server_enabled(server):
|
if servertools.is_server_enabled(server):
|
||||||
scrapedtitle = " Ver en " + server.capitalize() + " [" + idioma + "/" + calidad + "]"
|
scrapedtitle = " Ver en " + server.capitalize() + " [" + idioma + "/" + calidad + "]"
|
||||||
itemlist.append(item.clone(action="play", url=scrapedurl, title=scrapedtitle, text_color=color2,
|
itemlist.append(item.clone(action="play", url=scrapedurl, title=scrapedtitle, text_color=color2,
|
||||||
extra="", server=server))
|
extra="", server=server, language=idioma))
|
||||||
|
|
||||||
if len(itemlist) == 1:
|
if len(itemlist) == 1:
|
||||||
itemlist.append(item.clone(title=" No hay enlaces disponibles", action="", text_color=color2))
|
itemlist.append(item.clone(title=" No hay enlaces disponibles", action="", text_color=color2))
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ def findvideos(item):
|
|||||||
videoitem.plot = info
|
videoitem.plot = info
|
||||||
videoitem.action = "play"
|
videoitem.action = "play"
|
||||||
videoitem.folder = False
|
videoitem.folder = False
|
||||||
|
videoitem.infoLabels=item.infoLabels
|
||||||
|
|
||||||
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':
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
|
|||||||
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||||
if "player" in url:
|
if "player" in url:
|
||||||
scrapedserver = scrapertools.find_single_match(url, 'player/(\w+)')
|
scrapedserver = scrapertools.find_single_match(url, 'player/(\w+)')
|
||||||
|
if "ok" in scrapedserver: scrapedserver = "okru"
|
||||||
matches.append([url, scrapedserver, "", language.strip(), t_tipo])
|
matches.append([url, scrapedserver, "", language.strip(), t_tipo])
|
||||||
bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single')
|
bloque2 = scrapertools.find_single_match(data, '(?s)box_links.*?dt_social_single')
|
||||||
bloque2 = bloque2.replace("\t", "").replace("\r", "")
|
bloque2 = bloque2.replace("\t", "").replace("\r", "")
|
||||||
@@ -347,10 +348,12 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
|
|||||||
def play(item):
|
def play(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
if "api.cinetux" in item.url:
|
if "api.cinetux" in item.url or item.server == "okru":
|
||||||
data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "")
|
data = httptools.downloadpage(item.url, headers={'Referer': item.extra}).data.replace("\\", "")
|
||||||
id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"')
|
id = scrapertools.find_single_match(data, 'img src="[^#]+#(.*?)"')
|
||||||
item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id
|
item.url = "https://youtube.googleapis.com/embed/?status=ok&hl=es&allow_embed=1&ps=docs&partnerid=30&hd=1&autoplay=0&cc_load_policy=1&showinfo=0&docid=" + id
|
||||||
|
if item.server == "okru":
|
||||||
|
item.url = "https://ok.ru/videoembed/" + id
|
||||||
elif "links" in item.url or "www.cinetux.me" in item.url:
|
elif "links" in item.url or "www.cinetux.me" in item.url:
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
scrapedurl = scrapertools.find_single_match(data, '<a href="(http[^"]+)')
|
scrapedurl = scrapertools.find_single_match(data, '<a href="(http[^"]+)')
|
||||||
|
|||||||
@@ -3,24 +3,21 @@
|
|||||||
# Alfa
|
# Alfa
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
import urlparse,urllib2,urllib,re
|
import re
|
||||||
import os, sys
|
|
||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import tmdb
|
|
||||||
from core import jsontools as json
|
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from core import servertools
|
from core import servertools
|
||||||
|
from core import tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = list()
|
||||||
itemlist.append(item.clone(title="Novedades", action="peliculas", url="http://gnula.mobi/"))
|
itemlist.append(item.clone(title="Novedades", action="peliculas", url="http://gnula.mobi/"))
|
||||||
itemlist.append(item.clone(title="Castellano", action="peliculas",
|
itemlist.append(item.clone(title="Castellano", action="peliculas",
|
||||||
url="http://www.gnula.mobi/tag/esp)anol/"))
|
url="http://www.gnula.mobi/tag/espanol/"))
|
||||||
itemlist.append(item.clone(title="Latino", action="peliculas", url="http://gnula.mobi/tag/latino/"))
|
itemlist.append(item.clone(title="Latino", action="peliculas", url="http://gnula.mobi/tag/latino/"))
|
||||||
itemlist.append(item.clone(title="VOSE", action="peliculas", url="http://gnula.mobi/tag/subtitulada/"))
|
itemlist.append(item.clone(title="VOSE", action="peliculas", url="http://gnula.mobi/tag/subtitulada/"))
|
||||||
|
|
||||||
@@ -53,43 +50,66 @@ def sub_search(item):
|
|||||||
patron = '<div class="row">.*?<a href="([^"]+)" title="([^"]+)">.*?<img src="(.*?)" title'
|
patron = '<div class="row">.*?<a href="([^"]+)" title="([^"]+)">.*?<img src="(.*?)" title'
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for url,name,img in matches:
|
for url, name, img in matches:
|
||||||
itemlist.append(item.clone(title=name, url=url, action="findvideos", show=name, thumbnail=img))
|
itemlist.append(item.clone(title=name, url=url, action="findvideos", thumbnail=img))
|
||||||
|
|
||||||
paginacion = scrapertools.find_single_match(data, '<a href="([^"]+)" ><i class="glyphicon '
|
paginacion = scrapertools.find_single_match(data, '<a href="([^"]+)" ><i class="glyphicon '
|
||||||
'glyphicon-chevron-right" aria-hidden="true"></i>')
|
'glyphicon-chevron-right" aria-hidden="true"></i>')
|
||||||
|
|
||||||
if paginacion:
|
if paginacion:
|
||||||
itemlist.append(channel=item.channel, action="sub_search", title="Next page >>" , url=paginacion)
|
itemlist.append(Item(channel=item.channel, action="sub_search", title="Next page >>", url=paginacion))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def peliculas(item):
|
def peliculas(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>", "", data)
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
patron = '<div class="col-mt-5 postsh">.*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"'
|
patron = '<div class="col-mt-5 postsh">.*?href="(.*?)" title="(.*?)".*?under-title">(.*?)<.*?src="(.*?)"'
|
||||||
matches = re.compile(patron,re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for scrapedurl, scrapedyear, scrapedtitle, scrapedthumbnail in matches:
|
for scrapedurl, scrapedyear, scrapedtitle, scrapedthumbnail in matches:
|
||||||
|
|
||||||
url = scrapedurl
|
|
||||||
title = scrapedtitle
|
|
||||||
year = scrapertools.find_single_match(scrapedyear, r'.*?\((\d{4})\)')
|
year = scrapertools.find_single_match(scrapedyear, r'.*?\((\d{4})\)')
|
||||||
thumbnail = scrapedthumbnail
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=scrapedtitle, fulltitle = scrapedtitle, url=scrapedurl,
|
||||||
new_item =Item (channel = item.channel, action="findvideos", title=title, contentTitle=title, url=url,
|
thumbnail=scrapedthumbnail, infoLabels={'year': year}))
|
||||||
thumbnail=thumbnail, infoLabels = {'year':year})
|
|
||||||
if year:
|
|
||||||
tmdb.set_infoLabels_item(new_item)
|
|
||||||
|
|
||||||
itemlist.append(new_item)
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
|
next_page_url = scrapertools.find_single_match(data, '<link rel="next" href="(.*?)"')
|
||||||
next_page_url = scrapertools.find_single_match(data,'<link rel="next" href="(.*?)"\/>')
|
if next_page_url != "":
|
||||||
if next_page_url!="":
|
next_page_url = item.url + next_page_url
|
||||||
next_page_url = urlparse.urljoin(item.url,next_page_url)
|
|
||||||
itemlist.append(item.clone(action="peliculas", title="Siguiente >>", text_color="yellow",
|
itemlist.append(item.clone(action="peliculas", title="Siguiente >>", text_color="yellow",
|
||||||
url=next_page_url))
|
url=next_page_url))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(item.url).data
|
||||||
|
patron = 'data-src="([^"]+)".*?'
|
||||||
|
patron += 'data-toggle="tab">([^<]+)'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
for url, language in matches:
|
||||||
|
url = url.replace("&", "&")
|
||||||
|
response = httptools.downloadpage(url, follow_redirects=False, add_referer=True)
|
||||||
|
if response.data:
|
||||||
|
url = scrapertools.find_single_match(response.data, 'src="([^"]+)"')
|
||||||
|
else:
|
||||||
|
url = response.headers.get("location", "")
|
||||||
|
url = url.replace(""","")
|
||||||
|
titulo = "Ver en %s (" + language + ")"
|
||||||
|
itemlist.append(item.clone(
|
||||||
|
action = "play",
|
||||||
|
title = titulo,
|
||||||
|
url = url,
|
||||||
|
language = language))
|
||||||
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def play(item):
|
||||||
|
item.thumbnail = item.contentThumbnail
|
||||||
|
return [item]
|
||||||
|
|||||||
@@ -56,11 +56,17 @@ def peliculas(item):
|
|||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = '<a class="Ntooltip" href="([^"]+)">([^<]+)<span><br[^<]+'
|
patron = '<a class="Ntooltip" href="([^"]+)">([^<]+)<span><br[^<]+'
|
||||||
patron += '<img src="([^"]+)"></span></a>(.*?)<br'
|
patron += '<img src="([^"]+)"></span></a>(.*?)<br'
|
||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
itemlist = []
|
itemlist = []
|
||||||
for scrapedurl, scrapedtitle, scrapedthumbnail, resto in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail, resto in matches:
|
||||||
|
language = []
|
||||||
plot = scrapertools.htmlclean(resto).strip()
|
plot = scrapertools.htmlclean(resto).strip()
|
||||||
|
logger.debug('plot: %s' % plot)
|
||||||
|
languages = scrapertools.find_multiple_matches(plot, r'\((V.)\)')
|
||||||
|
quality = scrapertools.find_single_match(plot, r'(?:\[.*?\].*?)\[(.*?)\]')
|
||||||
|
for lang in languages:
|
||||||
|
language.append(lang)
|
||||||
|
logger.debug('languages: %s' % languages)
|
||||||
title = scrapedtitle + " " + plot
|
title = scrapedtitle + " " + plot
|
||||||
contentTitle = scrapedtitle
|
contentTitle = scrapedtitle
|
||||||
url = item.url + scrapedurl
|
url = item.url + scrapedurl
|
||||||
@@ -73,7 +79,9 @@ def peliculas(item):
|
|||||||
hasContentDetails = True,
|
hasContentDetails = True,
|
||||||
contentTitle = contentTitle,
|
contentTitle = contentTitle,
|
||||||
contentType = "movie",
|
contentType = "movie",
|
||||||
context = ["buscar_trailer"]
|
context = ["buscar_trailer"],
|
||||||
|
language=language,
|
||||||
|
quality=quality
|
||||||
))
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ def mainlist(item):
|
|||||||
itemlist.append(Item(channel=item.channel, action="menuseries", title="Series", url=host, folder=True))
|
itemlist.append(Item(channel=item.channel, action="menuseries", title="Series", url=host, folder=True))
|
||||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar..."))
|
itemlist.append(Item(channel=item.channel, action="search", title="Buscar..."))
|
||||||
if not account:
|
if not account:
|
||||||
itemlist.append(Item(channel=item.channel, title=bbcode_kodi2html(
|
itemlist.append(Item(channel=item.channel, title="[COLOR orange][B]Habilita tu cuenta para activar los items de usuario...[/B][/COLOR]",
|
||||||
"[COLOR orange][B]Habilita tu cuenta para activar los items de usuario...[/B][/COLOR]"),
|
|
||||||
action="settingCanal", url=""))
|
action="settingCanal", url=""))
|
||||||
else:
|
else:
|
||||||
login()
|
login()
|
||||||
@@ -66,10 +65,10 @@ def menupeliculas(item):
|
|||||||
|
|
||||||
if account:
|
if account:
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Favoritos[/B][/COLOR]"),
|
title="[COLOR orange][B]Favoritos[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=movies&action=favorite&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=movies&action=favorite&start=-28&limit=28", folder=True))
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Pendientes[/B][/COLOR]"),
|
title="[COLOR orange][B]Pendientes[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=movies&action=pending&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=movies&action=pending&start=-28&limit=28", folder=True))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="fichas", title="ABC", url=host + "/peliculas/abc", folder=True))
|
itemlist.append(Item(channel=item.channel, action="fichas", title="ABC", url=host + "/peliculas/abc", folder=True))
|
||||||
@@ -86,7 +85,7 @@ def menupeliculas(item):
|
|||||||
itemlist.append(Item(channel=item.channel, action="generos", title="Películas por Género", url=host, folder=True))
|
itemlist.append(Item(channel=item.channel, action="generos", title="Películas por Género", url=host, folder=True))
|
||||||
if account:
|
if account:
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Vistas[/B][/COLOR]"),
|
title="[COLOR orange][B]Vistas[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=movies&action=seen&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=movies&action=seen&start=-28&limit=28", folder=True))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -99,10 +98,10 @@ def menuseries(item):
|
|||||||
|
|
||||||
if account:
|
if account:
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Siguiendo[/B][/COLOR]"),
|
title="[COLOR orange][B]Siguiendo[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=shows&action=following&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=shows&action=following&start=-28&limit=28", folder=True))
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Para Ver[/B][/COLOR]"),
|
title="[COLOR orange][B]Para Ver[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=shows&action=watch&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=shows&action=watch&start=-28&limit=28", folder=True))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="series_abc", title="A-Z", folder=True))
|
itemlist.append(Item(channel=item.channel, action="series_abc", title="A-Z", folder=True))
|
||||||
@@ -123,13 +122,13 @@ def menuseries(item):
|
|||||||
url=host + "/series/list", folder=True))
|
url=host + "/series/list", folder=True))
|
||||||
if account:
|
if account:
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Favoritas[/B][/COLOR]"),
|
title="[COLOR orange][B]Favoritas[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=shows&action=favorite&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=shows&action=favorite&start=-28&limit=28", folder=True))
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Pendientes[/B][/COLOR]"),
|
title="[COLOR orange][B]Pendientes[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=shows&action=pending&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=shows&action=pending&start=-28&limit=28", folder=True))
|
||||||
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
itemlist.append(Item(channel=item.channel, action="items_usuario",
|
||||||
title=bbcode_kodi2html("[COLOR orange][B]Vistas[/B][/COLOR]"),
|
title="[COLOR orange][B]Vistas[/B][/COLOR]",
|
||||||
url=host + "/a/my?target=shows&action=seen&start=-28&limit=28", folder=True))
|
url=host + "/a/my?target=shows&action=seen&start=-28&limit=28", folder=True))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -222,7 +221,7 @@ def items_usuario(item):
|
|||||||
serie = ficha['show_title']['en'].strip()
|
serie = ficha['show_title']['en'].strip()
|
||||||
temporada = ficha['season']
|
temporada = ficha['season']
|
||||||
episodio = ficha['episode']
|
episodio = ficha['episode']
|
||||||
serie = bbcode_kodi2html("[COLOR whitesmoke][B]" + serie + "[/B][/COLOR]")
|
serie = "[COLOR whitesmoke][B]" + serie + "[/B][/COLOR]"
|
||||||
if len(episodio) == 1: episodio = '0' + episodio
|
if len(episodio) == 1: episodio = '0' + episodio
|
||||||
try:
|
try:
|
||||||
title = temporada + "x" + episodio + " - " + serie + ": " + title
|
title = temporada + "x" + episodio + " - " + serie + ": " + title
|
||||||
@@ -286,9 +285,8 @@ def fichas(item):
|
|||||||
if len(s_p) == 1:
|
if len(s_p) == 1:
|
||||||
data = s_p[0]
|
data = s_p[0]
|
||||||
if 'Lo sentimos</h3>' in s_p[0]:
|
if 'Lo sentimos</h3>' in s_p[0]:
|
||||||
return [Item(channel=item.channel, title=bbcode_kodi2html(
|
return [Item(channel=item.channel, title="[COLOR gold][B]HDFull:[/B][/COLOR] [COLOR blue]" + texto.replace('%20',
|
||||||
"[COLOR gold][B]HDFull:[/B][/COLOR] [COLOR blue]" + texto.replace('%20',
|
' ') + "[/COLOR] sin resultados")]
|
||||||
' ') + "[/COLOR] sin resultados"))]
|
|
||||||
else:
|
else:
|
||||||
data = s_p[0] + s_p[1]
|
data = s_p[0] + s_p[1]
|
||||||
else:
|
else:
|
||||||
@@ -321,12 +319,12 @@ def fichas(item):
|
|||||||
if scrapedlangs != ">":
|
if scrapedlangs != ">":
|
||||||
textoidiomas, language = extrae_idiomas(scrapedlangs)
|
textoidiomas, language = extrae_idiomas(scrapedlangs)
|
||||||
#Todo Quitar el idioma
|
#Todo Quitar el idioma
|
||||||
title += bbcode_kodi2html(" ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])")
|
title += " ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])"
|
||||||
|
|
||||||
if scrapedrating != ">":
|
if scrapedrating != ">":
|
||||||
valoracion = re.sub(r'><[^>]+>(\d+)<b class="dec">(\d+)</b>', r'\1,\2', scrapedrating)
|
valoracion = re.sub(r'><[^>]+>(\d+)<b class="dec">(\d+)</b>', r'\1,\2', scrapedrating)
|
||||||
infoLabels['rating']=valoracion
|
infoLabels['rating']=valoracion
|
||||||
title += bbcode_kodi2html(" ([COLOR orange]" + valoracion + "[/COLOR])")
|
title += " ([COLOR orange]" + valoracion + "[/COLOR])"
|
||||||
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
|
|
||||||
@@ -346,7 +344,7 @@ def fichas(item):
|
|||||||
|
|
||||||
if item.title == "Buscar...":
|
if item.title == "Buscar...":
|
||||||
tag_type = scrapertools.get_match(url, 'l.tv/([^/]+)/')
|
tag_type = scrapertools.get_match(url, 'l.tv/([^/]+)/')
|
||||||
title += bbcode_kodi2html(" - [COLOR blue]" + tag_type.capitalize() + "[/COLOR]")
|
title += " - [COLOR blue]" + tag_type.capitalize() + "[/COLOR]"
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action=action, title=title, url=url, fulltitle=title, thumbnail=thumbnail,
|
Item(channel=item.channel, action=action, title=title, url=url, fulltitle=title, thumbnail=thumbnail,
|
||||||
@@ -388,7 +386,7 @@ def episodios(item):
|
|||||||
str = get_status(status, "shows", id)
|
str = get_status(status, "shows", id)
|
||||||
if str != "" and account and item.category != "Series" and "XBMC" not in item.title:
|
if str != "" and account and item.category != "Series" and "XBMC" not in item.title:
|
||||||
if config.get_videolibrary_support():
|
if config.get_videolibrary_support():
|
||||||
title = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )")
|
title = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )"
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets,
|
Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets,
|
||||||
thumbnail=item.thumbnail, show=item.show, folder=False))
|
thumbnail=item.thumbnail, show=item.show, folder=False))
|
||||||
@@ -397,11 +395,11 @@ def episodios(item):
|
|||||||
thumbnail=item.thumbnail, show=item.show, folder=True))
|
thumbnail=item.thumbnail, show=item.show, folder=True))
|
||||||
elif account and item.category != "Series" and "XBMC" not in item.title:
|
elif account and item.category != "Series" and "XBMC" not in item.title:
|
||||||
if config.get_videolibrary_support():
|
if config.get_videolibrary_support():
|
||||||
title = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )")
|
title = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )"
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets,
|
Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=url_targets,
|
||||||
thumbnail=item.thumbnail, show=item.show, folder=False))
|
thumbnail=item.thumbnail, show=item.show, folder=False))
|
||||||
title = bbcode_kodi2html(" ( [COLOR orange][B]Seguir[/B][/COLOR] )")
|
title = " ( [COLOR orange][B]Seguir[/B][/COLOR] )"
|
||||||
itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets,
|
itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets,
|
||||||
thumbnail=item.thumbnail, show=item.show, folder=True))
|
thumbnail=item.thumbnail, show=item.show, folder=True))
|
||||||
|
|
||||||
@@ -436,7 +434,7 @@ def episodios(item):
|
|||||||
idiomas = "( [COLOR teal][B]"
|
idiomas = "( [COLOR teal][B]"
|
||||||
for idioma in episode['languages']: idiomas += idioma + " "
|
for idioma in episode['languages']: idiomas += idioma + " "
|
||||||
idiomas += "[/B][/COLOR])"
|
idiomas += "[/B][/COLOR])"
|
||||||
idiomas = bbcode_kodi2html(idiomas)
|
idiomas = idiomas
|
||||||
else:
|
else:
|
||||||
idiomas = ""
|
idiomas = ""
|
||||||
|
|
||||||
@@ -513,7 +511,7 @@ def novedades_episodios(item):
|
|||||||
idiomas = "( [COLOR teal][B]"
|
idiomas = "( [COLOR teal][B]"
|
||||||
for idioma in episode['languages']: idiomas += idioma + " "
|
for idioma in episode['languages']: idiomas += idioma + " "
|
||||||
idiomas += "[/B][/COLOR])"
|
idiomas += "[/B][/COLOR])"
|
||||||
idiomas = bbcode_kodi2html(idiomas)
|
idiomas = idiomas
|
||||||
else:
|
else:
|
||||||
idiomas = ""
|
idiomas = ""
|
||||||
|
|
||||||
@@ -522,7 +520,7 @@ def novedades_episodios(item):
|
|||||||
except:
|
except:
|
||||||
show = episode['show']['title']['en'].strip()
|
show = episode['show']['title']['en'].strip()
|
||||||
|
|
||||||
show = bbcode_kodi2html("[COLOR whitesmoke][B]" + show + "[/B][/COLOR]")
|
show = "[COLOR whitesmoke][B]" + show + "[/B][/COLOR]"
|
||||||
|
|
||||||
if episode['title']:
|
if episode['title']:
|
||||||
try:
|
try:
|
||||||
@@ -610,8 +608,9 @@ def generos_series(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
it1 = []
|
||||||
|
it2 = []
|
||||||
## Carga estados
|
## Carga estados
|
||||||
status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data)
|
status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data)
|
||||||
url_targets = item.url
|
url_targets = item.url
|
||||||
@@ -623,21 +622,21 @@ def findvideos(item):
|
|||||||
item.url = item.url.split("###")[0]
|
item.url = item.url.split("###")[0]
|
||||||
|
|
||||||
if type == "2" and account and item.category != "Cine":
|
if type == "2" and account and item.category != "Cine":
|
||||||
title = bbcode_kodi2html(" ( [COLOR orange][B]Agregar a Favoritos[/B][/COLOR] )")
|
title = " ( [COLOR orange][B]Agregar a Favoritos[/B][/COLOR] )"
|
||||||
if "Favorito" in item.title:
|
if "Favorito" in item.title:
|
||||||
title = bbcode_kodi2html(" ( [COLOR red][B]Quitar de Favoritos[/B][/COLOR] )")
|
title = " ( [COLOR red][B]Quitar de Favoritos[/B][/COLOR] )"
|
||||||
if config.get_videolibrary_support():
|
if config.get_videolibrary_support():
|
||||||
title_label = bbcode_kodi2html(" ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )")
|
title_label = " ( [COLOR gray][B]" + item.show + "[/B][/COLOR] )"
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title_label, fulltitle=title_label,
|
it1.append(Item(channel=item.channel, action="findvideos", title=title_label, fulltitle=title_label,
|
||||||
url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=False))
|
url=url_targets, thumbnail=item.thumbnail, show=item.show, folder=False))
|
||||||
|
|
||||||
title_label = bbcode_kodi2html(" ( [COLOR green][B]Tráiler[/B][/COLOR] )")
|
title_label = " ( [COLOR green][B]Tráiler[/B][/COLOR] )"
|
||||||
|
|
||||||
itemlist.append(
|
it1.append(
|
||||||
Item(channel=item.channel, action="trailer", title=title_label, fulltitle=title_label, url=url_targets,
|
item.clone(channel="trailertools", action="buscartrailer", title=title_label, contentTitle=item.show, url=item.url,
|
||||||
thumbnail=item.thumbnail, show=item.show))
|
thumbnail=item.thumbnail, show=item.show))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets,
|
it1.append(Item(channel=item.channel, action="set_status", title=title, fulltitle=title, url=url_targets,
|
||||||
thumbnail=item.thumbnail, show=item.show, folder=True))
|
thumbnail=item.thumbnail, show=item.show, folder=True))
|
||||||
|
|
||||||
data_js = httptools.downloadpage("http://hdfull.tv/templates/hdfull/js/jquery.hdfull.view.min.js").data
|
data_js = httptools.downloadpage("http://hdfull.tv/templates/hdfull/js/jquery.hdfull.view.min.js").data
|
||||||
@@ -663,7 +662,6 @@ def findvideos(item):
|
|||||||
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"]))
|
||||||
@@ -676,93 +674,43 @@ def findvideos(item):
|
|||||||
|
|
||||||
matches.append([match["lang"], match["quality"], url, embed])
|
matches.append([match["lang"], match["quality"], url, embed])
|
||||||
|
|
||||||
enlaces = []
|
|
||||||
for idioma, calidad, url, embed in matches:
|
for idioma, calidad, url, embed in matches:
|
||||||
servername = scrapertools.find_single_match(url, "(?:http:|https:)//(?:www.|)([^.]+).")
|
|
||||||
if servername == "streamin": servername = "streaminto"
|
|
||||||
if servername == "waaw": servername = "netutv"
|
|
||||||
if servername == "uploaded" or servername == "ul": servername = "uploadedto"
|
|
||||||
mostrar_server = True
|
mostrar_server = True
|
||||||
if config.get_setting("hidepremium") == True:
|
option = "Ver"
|
||||||
mostrar_server = servertools.is_server_enabled(servername)
|
option1 = 1
|
||||||
if mostrar_server:
|
if re.search(r'return ([\'"]{2,}|\})', embed):
|
||||||
option = "Ver"
|
option = "Descargar"
|
||||||
if re.search(r'return ([\'"]{2,}|\})', embed):
|
option1 = 2
|
||||||
option = "Descargar"
|
calidad = unicode(calidad, "utf8").upper().encode("utf8")
|
||||||
calidad = unicode(calidad, "utf8").upper().encode("utf8")
|
title = option + ": %s (" + calidad + ")" + " (" + idioma + ")"
|
||||||
servername_c = unicode(servername, "utf8").capitalize().encode("utf8")
|
thumbnail = item.thumbnail
|
||||||
title = option + ": " + servername_c + " (" + calidad + ")" + " (" + idioma + ")"
|
plot = item.title + "\n\n" + scrapertools.find_single_match(data,
|
||||||
thumbnail = item.thumbnail
|
'<meta property="og:description" content="([^"]+)"')
|
||||||
plot = item.title + "\n\n" + scrapertools.find_single_match(data,
|
plot = scrapertools.htmlclean(plot)
|
||||||
'<meta property="og:description" content="([^"]+)"')
|
fanart = scrapertools.find_single_match(data, '<div style="background-image.url. ([^\s]+)')
|
||||||
plot = scrapertools.htmlclean(plot)
|
if account:
|
||||||
fanart = scrapertools.find_single_match(data, '<div style="background-image.url. ([^\s]+)')
|
url += "###" + id + ";" + type
|
||||||
if account:
|
|
||||||
url += "###" + id + ";" + type
|
|
||||||
|
|
||||||
enlaces.append(
|
it2.append(
|
||||||
Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
item.clone(channel=item.channel, action="play", title=title, url=url, thumbnail=thumbnail,
|
||||||
plot=plot, fanart=fanart, show=item.show, folder=True, server=servername, infoLabels=infolabels,
|
plot=plot, fanart=fanart, show=item.show, folder=True, infoLabels=infolabels,
|
||||||
contentTitle=item.contentTitle, contentType=item.contentType, tipo=option))
|
contentTitle=item.title, contentType=item.contentType, tipo=option, tipo1=option1, idioma=idioma))
|
||||||
|
|
||||||
enlaces.sort(key=lambda it: it.tipo, reverse=True)
|
it2 = servertools.get_servers_itemlist(it2, lambda i: i.title % i.server.capitalize())
|
||||||
itemlist.extend(enlaces)
|
it2.sort(key=lambda it: (it.tipo1, it.idioma, it.server))
|
||||||
|
itemlist.extend(it1)
|
||||||
|
itemlist.extend(it2)
|
||||||
## 2 = película
|
## 2 = película
|
||||||
if type == "2" and item.category != "Cine":
|
if type == "2" and item.category != "Cine":
|
||||||
## STRM para todos los enlaces de servidores disponibles
|
if config.get_videolibrary_support():
|
||||||
## Si no existe el archivo STRM de la peícula muestra el item ">> Añadir a la videoteca..."
|
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||||
try:
|
action="add_pelicula_to_library", url=url_targets, thumbnail = item.thumbnail,
|
||||||
itemlist.extend(file_cine_library(item, url_targets))
|
fulltitle = item.contentTitle
|
||||||
except:
|
))
|
||||||
pass
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def trailer(item):
|
|
||||||
import youtube
|
|
||||||
itemlist = []
|
|
||||||
item.url = "https://www.googleapis.com/youtube/v3/search" + \
|
|
||||||
"?q=" + item.show.replace(" ", "+") + "+trailer+HD+Español" \
|
|
||||||
"®ionCode=ES" + \
|
|
||||||
"&part=snippet" + \
|
|
||||||
"&hl=es_ES" + \
|
|
||||||
"&key=AIzaSyAd-YEOqZz9nXVzGtn3KWzYLbLaajhqIDA" + \
|
|
||||||
"&type=video" + \
|
|
||||||
"&maxResults=50" + \
|
|
||||||
"&pageToken="
|
|
||||||
itemlist.extend(youtube.fichas(item))
|
|
||||||
# itemlist.pop(-1)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def file_cine_library(item, url_targets):
|
|
||||||
import os
|
|
||||||
from core import filetools
|
|
||||||
videolibrarypath = os.path.join(config.get_videolibrary_path(), "CINE")
|
|
||||||
archivo = item.show.strip()
|
|
||||||
strmfile = archivo + ".strm"
|
|
||||||
strmfilepath = filetools.join(videolibrarypath, strmfile)
|
|
||||||
|
|
||||||
if not os.path.exists(strmfilepath):
|
|
||||||
itemlist = []
|
|
||||||
itemlist.append(Item(channel=item.channel, title=">> Añadir a la videoteca...", url=url_targets,
|
|
||||||
action="add_file_cine_library", extra="episodios", show=archivo))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def add_file_cine_library(item):
|
|
||||||
from core import videolibrarytools
|
|
||||||
new_item = item.clone(title=item.show, action="play_from_library")
|
|
||||||
videolibrarytools.save_movie(new_item)
|
|
||||||
itemlist = []
|
|
||||||
itemlist.append(Item(title='El vídeo ' + item.show + ' se ha añadido a la videoteca'))
|
|
||||||
# xbmctools.renderItems(itemlist, "", "", "")
|
|
||||||
platformtools.render_items(itemlist, "")
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
def play(item):
|
||||||
if "###" in item.url:
|
if "###" in item.url:
|
||||||
@@ -780,13 +728,11 @@ def play(item):
|
|||||||
if devuelve:
|
if devuelve:
|
||||||
item.url = devuelve[0][1]
|
item.url = devuelve[0][1]
|
||||||
item.server = devuelve[0][2]
|
item.server = devuelve[0][2]
|
||||||
|
item.thumbnail = item.contentThumbnail
|
||||||
|
item.fulltitle = item.contentTitle
|
||||||
return [item]
|
return [item]
|
||||||
|
|
||||||
|
|
||||||
## --------------------------------------------------------------------------------
|
|
||||||
## --------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
def agrupa_datos(data):
|
def agrupa_datos(data):
|
||||||
## Agrupa los datos
|
## Agrupa los datos
|
||||||
data = re.sub(r'\n|\r|\t| |<br>|<!--.*?-->', '', data)
|
data = re.sub(r'\n|\r|\t| |<br>|<!--.*?-->', '', data)
|
||||||
@@ -810,22 +756,6 @@ def extrae_idiomas(bloqueidiomas):
|
|||||||
return textoidiomas, language
|
return textoidiomas, language
|
||||||
|
|
||||||
|
|
||||||
def bbcode_kodi2html(text):
|
|
||||||
if config.get_platform().startswith("plex") or config.get_platform().startswith("mediaserver"):
|
|
||||||
import re
|
|
||||||
text = re.sub(r'\[COLOR\s([^\]]+)\]',
|
|
||||||
r'<span style="color: \1">',
|
|
||||||
text)
|
|
||||||
text = text.replace('[/COLOR]', '</span>')
|
|
||||||
text = text.replace('[CR]', '<br>')
|
|
||||||
text = re.sub(r'\[([^\]]+)\]',
|
|
||||||
r'<\1>',
|
|
||||||
text)
|
|
||||||
text = text.replace('"color: white"', '"color: auto"')
|
|
||||||
|
|
||||||
return text
|
|
||||||
|
|
||||||
|
|
||||||
## --------------------------------------------------------------------------------
|
## --------------------------------------------------------------------------------
|
||||||
|
|
||||||
def set_status(item):
|
def set_status(item):
|
||||||
@@ -853,7 +783,7 @@ def set_status(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(host + path, post=post).data
|
data = httptools.downloadpage(host + path, post=post).data
|
||||||
|
|
||||||
title = bbcode_kodi2html("[COLOR green][B]OK[/B][/COLOR]")
|
title = "[COLOR green][B]OK[/B][/COLOR]"
|
||||||
|
|
||||||
return [Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=item.url,
|
return [Item(channel=item.channel, action="episodios", title=title, fulltitle=title, url=item.url,
|
||||||
thumbnail=item.thumbnail, show=item.show, folder=False)]
|
thumbnail=item.thumbnail, show=item.show, folder=False)]
|
||||||
@@ -871,15 +801,14 @@ def get_status(status, type, id):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if id in status['favorites'][type]:
|
if id in status['favorites'][type]:
|
||||||
str1 = bbcode_kodi2html(" [COLOR orange][B]Favorito[/B][/COLOR]")
|
str1 = " [COLOR orange][B]Favorito[/B][/COLOR]"
|
||||||
except:
|
except:
|
||||||
str1 = ""
|
str1 = ""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if id in status['status'][type]:
|
if id in status['status'][type]:
|
||||||
str2 = state[status['status'][type][id]]
|
str2 = state[status['status'][type][id]]
|
||||||
if str2 != "": str2 = bbcode_kodi2html(
|
if str2 != "": str2 = "[COLOR green][B]" + state[status['status'][type][id]] + "[/B][/COLOR]"
|
||||||
" [COLOR green][B]" + state[status['status'][type][id]] + "[/B][/COLOR]")
|
|
||||||
except:
|
except:
|
||||||
str2 = ""
|
str2 = ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
{
|
{
|
||||||
"id": "copiapop",
|
"id": "kbagi",
|
||||||
"name": "Copiapop/Diskokosmiko",
|
"name": "Kbagi/Diskokosmiko",
|
||||||
"language": ["cast", "lat"],
|
"language": ["cast", "lat"],
|
||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"date": "15/03/2017",
|
|
||||||
"autor": "SeiTaN",
|
|
||||||
"description": "limpieza código"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "16/02/2017",
|
|
||||||
"autor": "Cmos",
|
|
||||||
"description": "Primera versión"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"thumbnail": "http://i.imgur.com/EjbfM7p.png?1",
|
"thumbnail": "http://i.imgur.com/EjbfM7p.png?1",
|
||||||
"banner": "copiapop.png",
|
"banner": "copiapop.png",
|
||||||
"categories": [
|
"categories": [
|
||||||
@@ -33,19 +21,19 @@
|
|||||||
"visible": true
|
"visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "copiapopuser",
|
"id": "kbagiuser",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"color": "0xFF25AA48",
|
"color": "0xFF25AA48",
|
||||||
"label": "Usuario Copiapop",
|
"label": "Usuario Kbagi",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "copiapoppassword",
|
"id": "kbagipassword",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"color": "0xFF25AA48",
|
"color": "0xFF25AA48",
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"label": "Password Copiapop",
|
"label": "Password Kbagi",
|
||||||
"enabled": "!eq(-1,'')",
|
"enabled": "!eq(-1,'')",
|
||||||
"visible": true
|
"visible": true
|
||||||
},
|
},
|
||||||
Executable → Regular
+23
-23
@@ -9,7 +9,7 @@ from core import scrapertools
|
|||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
__perfil__ = config.get_setting('perfil', "copiapop")
|
__perfil__ = config.get_setting('perfil', "kbagi")
|
||||||
|
|
||||||
# Fijar perfil de color
|
# Fijar perfil de color
|
||||||
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFF088A08'],
|
perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFF088A08'],
|
||||||
@@ -21,20 +21,20 @@ if __perfil__ - 1 >= 0:
|
|||||||
else:
|
else:
|
||||||
color1 = color2 = color3 = color4 = color5 = ""
|
color1 = color2 = color3 = color4 = color5 = ""
|
||||||
|
|
||||||
adult_content = config.get_setting("adult_content", "copiapop")
|
adult_content = config.get_setting("adult_content", "kbagi")
|
||||||
|
|
||||||
|
|
||||||
def login(pagina):
|
def login(pagina):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user = config.get_setting("%suser" % pagina.split(".")[0], "copiapop")
|
user = config.get_setting("%suser" % pagina.split(".")[0], "kbagi")
|
||||||
password = config.get_setting("%spassword" % pagina.split(".")[0], "copiapop")
|
password = config.get_setting("%spassword" % pagina.split(".")[0], "kbagi")
|
||||||
if pagina == "copiapop.com":
|
if pagina == "kbagi.com":
|
||||||
if user == "" and password == "":
|
if user == "" and password == "":
|
||||||
return False, "Para ver los enlaces de copiapop es necesario registrarse en copiapop.com"
|
return False, "Para ver los enlaces de kbagi es necesario registrarse en kbagi.com"
|
||||||
elif user == "" or password == "":
|
elif user == "" or password == "":
|
||||||
return False, "Copiapop: Usuario o contraseña en blanco. Revisa tus credenciales"
|
return False, "kbagi: Usuario o contraseña en blanco. Revisa tus credenciales"
|
||||||
else:
|
else:
|
||||||
if user == "" or password == "":
|
if user == "" or password == "":
|
||||||
return False, "DiskoKosmiko: Usuario o contraseña en blanco. Revisa tus credenciales"
|
return False, "DiskoKosmiko: Usuario o contraseña en blanco. Revisa tus credenciales"
|
||||||
@@ -65,19 +65,19 @@ def mainlist(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
item.text_color = color1
|
item.text_color = color1
|
||||||
|
|
||||||
logueado, error_message = login("copiapop.com")
|
logueado, error_message = login("kbagi.com")
|
||||||
|
|
||||||
if not logueado:
|
if not logueado:
|
||||||
itemlist.append(item.clone(title=error_message, action="configuracion", folder=False))
|
itemlist.append(item.clone(title=error_message, action="configuracion", folder=False))
|
||||||
else:
|
else:
|
||||||
item.extra = "http://copiapop.com"
|
item.extra = "http://kbagi.com"
|
||||||
itemlist.append(item.clone(title="Copiapop", action="", text_color=color2))
|
itemlist.append(item.clone(title="kbagi", action="", text_color=color2))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title=" Búsqueda", action="search", url="http://copiapop.com/action/SearchFiles"))
|
item.clone(title=" Búsqueda", action="search", url="http://kbagi.com/action/SearchFiles"))
|
||||||
itemlist.append(item.clone(title=" Colecciones", action="colecciones",
|
itemlist.append(item.clone(title=" Colecciones", action="colecciones",
|
||||||
url="http://copiapop.com/action/home/MoreNewestCollections?pageNumber=1"))
|
url="http://kbagi.com/action/home/MoreNewestCollections?pageNumber=1"))
|
||||||
itemlist.append(item.clone(title=" Búsqueda personalizada", action="filtro",
|
itemlist.append(item.clone(title=" Búsqueda personalizada", action="filtro",
|
||||||
url="http://copiapop.com/action/SearchFiles"))
|
url="http://kbagi.com/action/SearchFiles"))
|
||||||
itemlist.append(item.clone(title=" Mi cuenta", action="cuenta"))
|
itemlist.append(item.clone(title=" Mi cuenta", action="cuenta"))
|
||||||
|
|
||||||
item.extra = "http://diskokosmiko.mx/"
|
item.extra = "http://diskokosmiko.mx/"
|
||||||
@@ -90,7 +90,7 @@ def mainlist(item):
|
|||||||
itemlist.append(item.clone(title=" Mi cuenta", action="cuenta"))
|
itemlist.append(item.clone(title=" Mi cuenta", action="cuenta"))
|
||||||
itemlist.append(item.clone(action="", title=""))
|
itemlist.append(item.clone(action="", title=""))
|
||||||
|
|
||||||
folder_thumb = filetools.join(config.get_data_path(), 'thumbs_copiapop')
|
folder_thumb = filetools.join(config.get_data_path(), 'thumbs_kbagi')
|
||||||
files = filetools.listdir(folder_thumb)
|
files = filetools.listdir(folder_thumb)
|
||||||
if files:
|
if files:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
@@ -133,7 +133,7 @@ def listado(item):
|
|||||||
data = httptools.downloadpage(item.url, item.post).data
|
data = httptools.downloadpage(item.url, item.post).data
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| |<br>", "", data)
|
data = re.sub(r"\n|\r|\t|\s{2}| |<br>", "", data)
|
||||||
|
|
||||||
folder = filetools.join(config.get_data_path(), 'thumbs_copiapop')
|
folder = filetools.join(config.get_data_path(), 'thumbs_kbagi')
|
||||||
patron = '<div class="size">(.*?)</div></div></div>'
|
patron = '<div class="size">(.*?)</div></div></div>'
|
||||||
bloques = scrapertools.find_multiple_matches(data, patron)
|
bloques = scrapertools.find_multiple_matches(data, patron)
|
||||||
for block in bloques:
|
for block in bloques:
|
||||||
@@ -204,7 +204,7 @@ def findvideos(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
itemlist.append(item.clone(action="play", title="Reproducir/Descargar", server="copiapop"))
|
itemlist.append(item.clone(action="play", title="Reproducir/Descargar", server="kbagi"))
|
||||||
usuario = scrapertools.find_single_match(item.url, '%s/([^/]+)/' % item.extra)
|
usuario = scrapertools.find_single_match(item.url, '%s/([^/]+)/' % item.extra)
|
||||||
url_usuario = item.extra + "/" + usuario
|
url_usuario = item.extra + "/" + usuario
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ def colecciones(item):
|
|||||||
matches = matches[:20]
|
matches = matches[:20]
|
||||||
index = 20
|
index = 20
|
||||||
|
|
||||||
folder = filetools.join(config.get_data_path(), 'thumbs_copiapop')
|
folder = filetools.join(config.get_data_path(), 'thumbs_kbagi')
|
||||||
for url, scrapedtitle, thumb, info in matches:
|
for url, scrapedtitle, thumb, info in matches:
|
||||||
url = item.extra + url + "/gallery,1,1?ref=pager"
|
url = item.extra + url + "/gallery,1,1?ref=pager"
|
||||||
title = "%s (%s)" % (scrapedtitle, scrapertools.htmlclean(info))
|
title = "%s (%s)" % (scrapedtitle, scrapertools.htmlclean(info))
|
||||||
@@ -313,7 +313,7 @@ def cuenta(item):
|
|||||||
import urllib
|
import urllib
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
web = "copiapop"
|
web = "kbagi"
|
||||||
if "diskokosmiko" in item.extra:
|
if "diskokosmiko" in item.extra:
|
||||||
web = "diskokosmiko"
|
web = "diskokosmiko"
|
||||||
logueado, error_message = login("diskokosmiko.mx")
|
logueado, error_message = login("diskokosmiko.mx")
|
||||||
@@ -321,7 +321,7 @@ def cuenta(item):
|
|||||||
itemlist.append(item.clone(title=error_message, action="configuracion", folder=False))
|
itemlist.append(item.clone(title=error_message, action="configuracion", folder=False))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
user = config.get_setting("%suser" % web, "copiapop")
|
user = config.get_setting("%suser" % web, "kbagi")
|
||||||
user = unicode(user, "utf8").lower().encode("utf8")
|
user = unicode(user, "utf8").lower().encode("utf8")
|
||||||
url = item.extra + "/" + urllib.quote(user)
|
url = item.extra + "/" + urllib.quote(user)
|
||||||
data = httptools.downloadpage(url).data
|
data = httptools.downloadpage(url).data
|
||||||
@@ -364,7 +364,7 @@ def filtro(item):
|
|||||||
'type': 'text', 'default': '0', 'visible': True})
|
'type': 'text', 'default': '0', 'visible': True})
|
||||||
|
|
||||||
# Se utilizan los valores por defecto/guardados
|
# Se utilizan los valores por defecto/guardados
|
||||||
web = "copiapop"
|
web = "kbagi"
|
||||||
if "diskokosmiko" in item.extra:
|
if "diskokosmiko" in item.extra:
|
||||||
web = "diskokosmiko"
|
web = "diskokosmiko"
|
||||||
valores_guardados = config.get_setting("filtro_defecto_" + web, item.channel)
|
valores_guardados = config.get_setting("filtro_defecto_" + web, item.channel)
|
||||||
@@ -378,7 +378,7 @@ def filtro(item):
|
|||||||
|
|
||||||
def filtrado(item, values):
|
def filtrado(item, values):
|
||||||
values_copy = values.copy()
|
values_copy = values.copy()
|
||||||
web = "copiapop"
|
web = "kbagi"
|
||||||
if "diskokosmiko" in item.extra:
|
if "diskokosmiko" in item.extra:
|
||||||
web = "diskokosmiko"
|
web = "diskokosmiko"
|
||||||
# Guarda el filtro para que sea el que se cargue por defecto
|
# Guarda el filtro para que sea el que se cargue por defecto
|
||||||
@@ -407,7 +407,7 @@ def download_thumb(filename, url):
|
|||||||
|
|
||||||
lock = threading.Lock()
|
lock = threading.Lock()
|
||||||
lock.acquire()
|
lock.acquire()
|
||||||
folder = filetools.join(config.get_data_path(), 'thumbs_copiapop')
|
folder = filetools.join(config.get_data_path(), 'thumbs_kbagi')
|
||||||
if not filetools.exists(folder):
|
if not filetools.exists(folder):
|
||||||
filetools.mkdir(folder)
|
filetools.mkdir(folder)
|
||||||
lock.release()
|
lock.release()
|
||||||
@@ -419,7 +419,7 @@ def download_thumb(filename, url):
|
|||||||
|
|
||||||
|
|
||||||
def delete_cache(url):
|
def delete_cache(url):
|
||||||
folder = filetools.join(config.get_data_path(), 'thumbs_copiapop')
|
folder = filetools.join(config.get_data_path(), 'thumbs_kbagi')
|
||||||
filetools.rmdirtree(folder)
|
filetools.rmdirtree(folder)
|
||||||
if config.is_xbmc():
|
if config.is_xbmc():
|
||||||
import xbmc
|
import xbmc
|
||||||
@@ -104,9 +104,10 @@ def peliculas(item):
|
|||||||
new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
||||||
contentTitle = contentTitle , infoLabels={'year':year} )
|
contentTitle = contentTitle , infoLabels={'year':year} )
|
||||||
|
|
||||||
if year:
|
#if year:
|
||||||
tmdb.set_infoLabels_item(new_item)
|
# tmdb.set_infoLabels_item(new_item)
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
try:
|
try:
|
||||||
patron = '<a href="([^"]+)" ><span class="icon-chevron-right"></span></a></div>'
|
patron = '<a href="([^"]+)" ><span class="icon-chevron-right"></span></a></div>'
|
||||||
next_page = re.compile(patron,re.DOTALL).findall(data)
|
next_page = re.compile(patron,re.DOTALL).findall(data)
|
||||||
|
|||||||
@@ -339,20 +339,20 @@ def episodios(item):
|
|||||||
infoLabels = item.infoLabels
|
infoLabels = item.infoLabels
|
||||||
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")
|
||||||
logger.debug('data: %s'%data)
|
|
||||||
pattern = '<ul class="%s">(.*?)</ul>' % "pagination" # item.pattern
|
pattern = '<ul class="%s">(.*?)</ul>' % "pagination" # item.pattern
|
||||||
pagination = scrapertools.find_single_match(data, pattern)
|
pagination = scrapertools.find_single_match(data, pattern)
|
||||||
if pagination:
|
if pagination:
|
||||||
pattern = '<li><a href="([^"]+)">Last<\/a>'
|
pattern = '<li><a href="([^"]+)">Last<\/a>'
|
||||||
full_url = scrapertools.find_single_match(pagination, pattern)
|
full_url = scrapertools.find_single_match(pagination, pattern)
|
||||||
url, last_page = scrapertools.find_single_match(full_url, r'(.*?\/pg\/)(\d+)')
|
url, last_page = scrapertools.find_single_match(full_url, r'(.*?\/pg\/)(\d+)')
|
||||||
list_pages = []
|
list_pages = [item.url]
|
||||||
for x in range(1, int(last_page) + 1):
|
for x in range(2, int(last_page) + 1):
|
||||||
list_pages.append("%s%s" % (url, x))
|
response = httptools.downloadpage('%s%s'% (url,x))
|
||||||
|
if response.sucess:
|
||||||
|
list_pages.append("%s%s" % (url, x))
|
||||||
else:
|
else:
|
||||||
list_pages = [item.url]
|
list_pages = [item.url]
|
||||||
|
|
||||||
logger.debug ('pattern: %s'%pattern)
|
|
||||||
for index, page in enumerate(list_pages):
|
for index, page in enumerate(list_pages):
|
||||||
logger.debug("Loading page %s/%s url=%s" % (index, len(list_pages), page))
|
logger.debug("Loading page %s/%s url=%s" % (index, len(list_pages), page))
|
||||||
data = re.sub(r"\n|\r|\t|\s{2,}", "", httptools.downloadpage(page).data)
|
data = re.sub(r"\n|\r|\t|\s{2,}", "", httptools.downloadpage(page).data)
|
||||||
|
|||||||
@@ -14,18 +14,19 @@ from core.item import Item
|
|||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
host = 'http://www.ohpelis.com'
|
host = 'http://www.ohpelis.com'
|
||||||
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}
|
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
data = httptools.downloadpage(host).data
|
||||||
|
patron = '<li class="cat-item cat-item-\d+"><a href="(.*?)" >(.*?)<\/a> <i>(\d+)<\/i>'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
mcantidad = 0
|
||||||
|
for scrapedurl, scrapedtitle, cantidad in matches:
|
||||||
|
mcantidad += int(cantidad)
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title="Peliculas",
|
item.clone(title="Peliculas (%s)" %mcantidad,
|
||||||
action='movies_menu'
|
action='movies_menu'
|
||||||
))
|
))
|
||||||
|
|
||||||
@@ -95,14 +96,14 @@ def list_all(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, scrapedplot in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedyear, scrapedplot in matches:
|
||||||
title = scrapedtitle
|
title = scrapedtitle
|
||||||
plot = scrapedplot
|
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
year = scrapedyear
|
year = scrapedyear
|
||||||
new_item = (item.clone(title=title,
|
new_item = (item.clone(title=title,
|
||||||
url=url,
|
url=url,
|
||||||
thumbnail=thumbnail,
|
thumbnail=thumbnail,
|
||||||
plot=plot,
|
fulltitle=title,
|
||||||
|
contentTitle=title,
|
||||||
infoLabels={'year': year}
|
infoLabels={'year': year}
|
||||||
))
|
))
|
||||||
if item.extra == 'serie':
|
if item.extra == 'serie':
|
||||||
@@ -114,7 +115,7 @@ def list_all(item):
|
|||||||
|
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
# Paginacion
|
# Paginacion
|
||||||
next_page = scrapertools.find_single_match(data, '<link rel="next" href="(.*?) />')
|
next_page = scrapertools.find_single_match(data, '<link rel="next" href="(.*?) />')
|
||||||
if next_page:
|
if next_page:
|
||||||
@@ -162,7 +163,6 @@ def search_list(item):
|
|||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedtype, scrapedyear, scrapedplot in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedtype, scrapedyear, scrapedplot in matches:
|
||||||
title = scrapedtitle
|
title = scrapedtitle
|
||||||
plot = scrapedplot
|
|
||||||
thumbnail = scrapedthumbnail
|
thumbnail = scrapedthumbnail
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
year = scrapedyear
|
year = scrapedyear
|
||||||
@@ -170,7 +170,6 @@ def search_list(item):
|
|||||||
title=title,
|
title=title,
|
||||||
url=url,
|
url=url,
|
||||||
thumbnail=thumbnail,
|
thumbnail=thumbnail,
|
||||||
plot=plot,
|
|
||||||
infoLabels={'year': year})
|
infoLabels={'year': year})
|
||||||
if scrapedtype == 'movies':
|
if scrapedtype == 'movies':
|
||||||
new_item.action = 'findvideos'
|
new_item.action = 'findvideos'
|
||||||
@@ -275,11 +274,14 @@ def findvideos(item):
|
|||||||
itemlist.extend(servertools.find_video_items(data=data))
|
itemlist.extend(servertools.find_video_items(data=data))
|
||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.channel = item.channel
|
videoitem.channel = item.channel
|
||||||
|
videoitem.contentTitle = item.fulltitle
|
||||||
|
videoitem.infoLabels = item.infoLabels
|
||||||
if videoitem.server != 'youtube':
|
if videoitem.server != 'youtube':
|
||||||
videoitem.title = item.title + ' (%s)' % videoitem.server
|
videoitem.title = item.title + ' (%s)' % videoitem.server
|
||||||
else:
|
else:
|
||||||
videoitem.title = 'Trailer en %s' % videoitem.server
|
videoitem.title = 'Trailer en %s' % videoitem.server
|
||||||
videoitem.action = 'play'
|
videoitem.action = 'play'
|
||||||
|
videoitem.server = ""
|
||||||
|
|
||||||
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':
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
@@ -288,9 +290,9 @@ def findvideos(item):
|
|||||||
url=item.url,
|
url=item.url,
|
||||||
action="add_pelicula_to_library",
|
action="add_pelicula_to_library",
|
||||||
extra="findvideos",
|
extra="findvideos",
|
||||||
contentTitle=item.contentTitle,
|
|
||||||
))
|
))
|
||||||
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -314,3 +316,8 @@ def newest(categoria):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
def play(item):
|
||||||
|
logger.info()
|
||||||
|
item.thumbnail = item.contentThumbnail
|
||||||
|
return [item]
|
||||||
|
|||||||
@@ -120,40 +120,51 @@ def peliculas(item):
|
|||||||
if len(matches_next_page) > 0:
|
if len(matches_next_page) > 0:
|
||||||
url_next_page = urlparse.urljoin(item.url, matches_next_page[0])
|
url_next_page = urlparse.urljoin(item.url, matches_next_page[0])
|
||||||
|
|
||||||
for scrapedthumbnail, scrapedtitle, rating, calidad, scrapedurl, year in matches:
|
for scrapedthumbnail, scrapedtitle, rating, quality, scrapedurl, year in matches:
|
||||||
if 'Proximamente' not in calidad:
|
if 'Proximamente' not in quality:
|
||||||
scrapedtitle = scrapedtitle.replace('Ver ', '').partition(' /')[0].partition(':')[0].replace(
|
scrapedtitle = scrapedtitle.replace('Ver ', '').partition(' /')[0].partition(':')[0].replace(
|
||||||
'Español Latino', '').strip()
|
'Español Latino', '').strip()
|
||||||
title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (scrapedtitle, year, calidad)
|
title = "%s [COLOR green][%s][/COLOR] [COLOR yellow][%s][/COLOR]" % (scrapedtitle, year, quality)
|
||||||
|
|
||||||
new_item = Item(channel=__channel__, action="findvideos", contentTitle=scrapedtitle,
|
|
||||||
infoLabels={'year': year, 'rating': rating}, thumbnail=scrapedthumbnail,
|
|
||||||
url=scrapedurl, next_page=next_page, quality=calidad, title=title)
|
itemlist.append(Item(channel=item.channel, action="findvideos", contentTitle=scrapedtitle,
|
||||||
if year:
|
infoLabels={"year":year, "rating":rating}, thumbnail=scrapedthumbnail,
|
||||||
tmdb.set_infoLabels_item(new_item, __modo_grafico__)
|
url=scrapedurl, next_page=next_page, quality=quality, title=title))
|
||||||
itemlist.append(new_item)
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||||
|
|
||||||
if url_next_page:
|
if url_next_page:
|
||||||
itemlist.append(Item(channel=__channel__, action="peliculas", title="» Siguiente »",
|
itemlist.append(Item(channel=__channel__, action="peliculas", title="» Siguiente »",
|
||||||
url=url_next_page, next_page=next_page, folder=True, text_blod=True,
|
url=url_next_page, next_page=next_page, folder=True, text_blod=True,
|
||||||
thumbnail=get_thumb("next.png")))
|
thumbnail=get_thumb("next.png")))
|
||||||
|
|
||||||
for item in itemlist:
|
for no_plot in itemlist:
|
||||||
if item.infoLabels['plot'] == '':
|
if no_plot.infoLabels['plot'] == '':
|
||||||
data = httptools.downloadpage(item.url).data
|
thumb_id = scrapertools.find_single_match(no_plot.thumbnail, '.*?\/\d{2}\/(.*?)-')
|
||||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
thumbnail = "/%s.jpg" % thumb_id
|
||||||
# logger.info(data)
|
filtro_list = {"poster_path": thumbnail}
|
||||||
item.fanart = scrapertools.find_single_match(data,
|
filtro_list = filtro_list.items()
|
||||||
"<meta property='og:image' content='([^']+)' />").replace(
|
no_plot.infoLabels={'filtro':filtro_list}
|
||||||
'w780', 'original')
|
tmdb.set_infoLabels_item(no_plot, __modo_grafico__)
|
||||||
item.plot = scrapertools.find_single_match(data, '<div itemprop="description" class="wp-content">.*?<p>(['
|
|
||||||
'^<]+)</p>')
|
if no_plot.infoLabels['plot'] == '':
|
||||||
item.plot = scrapertools.htmlclean(item.plot)
|
data = httptools.downloadpage(no_plot.url).data
|
||||||
item.infoLabels['director'] = scrapertools.find_single_match(data,
|
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||||
'<div class="name"><a href="[^"]+">([^<]+)</a>')
|
# logger.info(data)
|
||||||
item.infoLabels['rating'] = scrapertools.find_single_match(data, '<b id="repimdb"><strong>([^<]+)</strong>')
|
no_plot.fanart = scrapertools.find_single_match(data,
|
||||||
item.infoLabels['votes'] = scrapertools.find_single_match(data, '<b id="repimdb"><strong>['
|
"<meta property='og:image' content='([^']+)' />").replace(
|
||||||
'^<]+</strong>\s(.*?) votos</b>')
|
'w780', 'original')
|
||||||
|
no_plot.plot = scrapertools.find_single_match(data, '<div itemprop="description" '
|
||||||
|
'class="wp-content">.*?<p>(['
|
||||||
|
'^<]+)</p>')
|
||||||
|
no_plot.plot = scrapertools.htmlclean(no_plot.plot)
|
||||||
|
no_plot.infoLabels['director'] = scrapertools.find_single_match(data,
|
||||||
|
'<div class="name"><a href="[^"]+">([^<]+)</a>')
|
||||||
|
no_plot.infoLabels['rating'] = scrapertools.find_single_match(data, '<b id="repimdb"><strong>(['
|
||||||
|
'^<]+)</strong>')
|
||||||
|
no_plot.infoLabels['votes'] = scrapertools.find_single_match(data, '<b id="repimdb"><strong>['
|
||||||
|
'^<]+</strong>\s(.*?) votos</b>')
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ def findvideos(item):
|
|||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
server = servertools.get_server_name(servidor)
|
server = servertools.get_server_name(servidor)
|
||||||
title = "Enlace encontrado en %s" % (server)
|
title = "Enlace encontrado en %s" % (server)
|
||||||
|
if idioma == 'Ingles Subtitulado':
|
||||||
|
idioma = 'vose'
|
||||||
itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url,
|
itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url,
|
||||||
thumbnail=scrapedthumbnail, language=idioma, quality=calidad, server=server))
|
thumbnail=scrapedthumbnail, language=idioma, quality=calidad, server=server))
|
||||||
if itemlist:
|
if itemlist:
|
||||||
|
|||||||
@@ -76,14 +76,11 @@ def peliculas(item):
|
|||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
# Extrae la marca de siguiente página
|
# Extrae la marca de siguiente página
|
||||||
paginador = scrapertools.find_single_match(data, "<div class='paginado'>.*?lateral")
|
next_page = scrapertools.find_single_match(data, 'class="nextpostslink" rel="next" href="(.*?)">')
|
||||||
|
|
||||||
patron = "<li.*?<a class='current'>.*?href='([^']+)"
|
if next_page:
|
||||||
scrapedurl = scrapertools.find_single_match(paginador, patron)
|
|
||||||
|
|
||||||
if scrapedurl:
|
|
||||||
scrapedtitle = "!Pagina Siguiente ->"
|
scrapedtitle = "!Pagina Siguiente ->"
|
||||||
itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=scrapedurl, folder=True))
|
itemlist.append(Item(channel=item.channel, action="peliculas", title=scrapedtitle, url=next_page, folder=True))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import urlparse
|
|
||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from core import servertools
|
from core import servertools
|
||||||
|
from core import tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
|
||||||
@@ -16,117 +16,54 @@ def mainlist(item):
|
|||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(Item(channel=item.channel, action="peliculas", title="Recientes", url=host))
|
itemlist.append(Item(channel=item.channel, action="peliculas", title="Recientes", url=host))
|
||||||
itemlist.append(Item(channel=item.channel, action="PorFecha", title="Año de Lanzamiento", url=host))
|
itemlist.append(Item(channel = item.channel,
|
||||||
itemlist.append(Item(channel=item.channel, action="Idiomas", title="Idiomas", url=host))
|
action = "filtro",
|
||||||
itemlist.append(Item(channel=item.channel, action="calidades", title="Por calidad", url=host))
|
title = "Año de Lanzamiento",
|
||||||
itemlist.append(Item(channel=item.channel, action="generos", title="Por género", url=host))
|
category = "lanzamiento"
|
||||||
|
))
|
||||||
|
itemlist.append(Item(channel = item.channel,
|
||||||
|
action = "filtro",
|
||||||
|
title = "Idiomas",
|
||||||
|
category = "idioma"
|
||||||
|
))
|
||||||
|
itemlist.append(Item(channel = item.channel,
|
||||||
|
action = "filtro",
|
||||||
|
title = "Por calidad",
|
||||||
|
category = "calidades"
|
||||||
|
))
|
||||||
|
itemlist.append(Item(channel = item.channel,
|
||||||
|
action = "filtro",
|
||||||
|
title = "Por género",
|
||||||
|
category = "generos"
|
||||||
|
))
|
||||||
itemlist.append(Item(channel=item.channel, action="search", title="Buscar...", url=host))
|
itemlist.append(Item(channel=item.channel, action="search", title="Buscar...", url=host))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def PorFecha(item):
|
def filtro(item):
|
||||||
logger.info()
|
logger.info(item.category)
|
||||||
|
|
||||||
# Descarga la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = scrapertools.find_single_match(data, '<section class="lanzamiento">(.*?)</section>')
|
|
||||||
|
|
||||||
# Extrae las entradas (carpetas)
|
|
||||||
patron = '<a href="([^"]+).*?title="([^"]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
patron1 = '<section class="%s">(.*?)</section>' %item.category
|
||||||
|
patron2 = '<a href="([^"]+).*?title="([^"]+)'
|
||||||
|
data = httptools.downloadpage(host).data
|
||||||
|
data = scrapertools.find_single_match(data, patron1)
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron2)
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
title = scrapedtitle.strip()
|
if "Adulto" in scrapedtitle and config.get_setting("adult_mode") == 0:
|
||||||
thumbnail = ""
|
|
||||||
plot = ""
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, action="peliculas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
|
||||||
fulltitle=title, viewmode="movie"))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def Idiomas(item):
|
|
||||||
logger.info()
|
|
||||||
|
|
||||||
# Descarga la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = scrapertools.find_single_match(data, '<section class="idioma">(.*?)</section>')
|
|
||||||
|
|
||||||
# Extrae las entradas (carpetas)
|
|
||||||
patron = '<a href="([^"]+).*?title="([^"]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
title = scrapedtitle.strip()
|
|
||||||
thumbnail = ""
|
|
||||||
plot = ""
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, action="peliculas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
|
||||||
fulltitle=title, viewmode="movie"))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def calidades(item):
|
|
||||||
logger.info()
|
|
||||||
|
|
||||||
# Descarga la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = scrapertools.find_single_match(data, '<section class="calidades">(.*?)</section>')
|
|
||||||
|
|
||||||
# Extrae las entradas (carpetas)
|
|
||||||
patron = '<a href="([^"]+).*?title="([^"]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
title = scrapedtitle.strip()
|
|
||||||
thumbnail = ""
|
|
||||||
plot = ""
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, action="peliculas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
|
||||||
fulltitle=title, viewmode="movie"))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def generos(item):
|
|
||||||
logger.info()
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
data = scrapertools.find_single_match(data, '<section class="generos">(.*?)</section>')
|
|
||||||
patron = '<a href="([^"]+).*?title="([^"]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
title = scrapedtitle.strip()
|
|
||||||
thumbnail = ""
|
|
||||||
plot = ""
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
|
||||||
if "Adulto" in title and config.get_setting("adult_mode") == 0:
|
|
||||||
continue
|
continue
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="peliculas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
Item(channel=item.channel, action="peliculas", title=scrapedtitle.strip(), url=scrapedurl,
|
||||||
fulltitle=title, viewmode="movie"))
|
viewmode="movie"))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info()
|
logger.info()
|
||||||
texto = texto.replace(" ", "+")
|
texto = texto.replace(" ", "+")
|
||||||
item.url = host + "?s=" + texto
|
item.url = host + "?s=" + texto
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# return buscar(item)
|
|
||||||
return peliculas(item)
|
return peliculas(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:
|
||||||
@@ -138,21 +75,20 @@ def search(item, texto):
|
|||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
# Descarga la pagina
|
# Descarga la pagina
|
||||||
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)
|
||||||
|
|
||||||
tabla_pelis = scrapertools.find_single_match(data,
|
tabla_pelis = scrapertools.find_single_match(data,
|
||||||
'class="section col-17 col-main grid-125 overflow clearfix">(.*?)</div></section>')
|
'class="section col-17 col-main grid-125 overflow clearfix">(.*?)</div></section>')
|
||||||
patron = '<img src="([^"]+)" alt="([^"]+).*?href="([^"]+)'
|
patron = '<img src="([^"]+)" alt="([^"]+).*?href="([^"]+)'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(tabla_pelis)
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
for scrapedthumbnail, scrapedtitle, scrapedurl in matches:
|
for scrapedthumbnail, scrapedtitle, scrapedurl in matches:
|
||||||
|
year = scrapertools.find_single_match(scrapedtitle, "[0-9]{4}")
|
||||||
fulltitle = scrapedtitle.replace(scrapertools.find_single_match(scrapedtitle, '\([0-9]+\)' ), "")
|
fulltitle = scrapedtitle.replace(scrapertools.find_single_match(scrapedtitle, '\([0-9]+\)' ), "")
|
||||||
itemlist.append(Item(channel = item.channel,
|
item.infoLabels['year'] = year
|
||||||
|
itemlist.append(item.clone(channel = item.channel,
|
||||||
action = "findvideos",
|
action = "findvideos",
|
||||||
title = scrapedtitle,
|
title = scrapedtitle,
|
||||||
url = scrapedurl,
|
url = scrapedurl,
|
||||||
@@ -160,7 +96,7 @@ def peliculas(item):
|
|||||||
plot = "",
|
plot = "",
|
||||||
fulltitle = fulltitle
|
fulltitle = fulltitle
|
||||||
))
|
))
|
||||||
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
next_page = scrapertools.find_single_match(data, 'rel="next" href="([^"]+)')
|
next_page = scrapertools.find_single_match(data, 'rel="next" href="([^"]+)')
|
||||||
if next_page != "":
|
if next_page != "":
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
@@ -172,31 +108,30 @@ def peliculas(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = 'hand" rel="([^"]+).*?title="(.*?)".*?<span>([^<]+)</span>.*?</span><span class="q">(.*?)<'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
encontrados = []
|
encontrados = []
|
||||||
itemtemp = []
|
data = httptools.downloadpage(item.url).data
|
||||||
|
patron = 'hand" rel="([^"]+).*?title="(.*?)".*?<span>([^<]+)</span>.*?</span><span class="q">(.*?)<'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for scrapedurl, server_name, language, quality in matches:
|
for scrapedurl, server_name, language, quality in matches:
|
||||||
if scrapedurl in encontrados:
|
if scrapedurl in encontrados:
|
||||||
continue
|
continue
|
||||||
encontrados.append(scrapedurl)
|
encontrados.append(scrapedurl)
|
||||||
language = language.strip()
|
language = language.strip()
|
||||||
quality = quality.strip()
|
quality = quality.strip()
|
||||||
itemlist.append(Item(channel=item.channel,
|
mq = "(" + quality + ")"
|
||||||
|
if "http" in quality:
|
||||||
|
quality = mq = ""
|
||||||
|
titulo = "%s (" + language + ") " + mq
|
||||||
|
itemlist.append(item.clone(channel=item.channel,
|
||||||
action = "play",
|
action = "play",
|
||||||
extra = "",
|
title = titulo,
|
||||||
fulltitle = item.fulltitle,
|
|
||||||
title = "%s (" + language + ") (" + quality + ")",
|
|
||||||
thumbnail = item.thumbnail,
|
|
||||||
url = scrapedurl,
|
url = scrapedurl,
|
||||||
folder = False,
|
folder = False,
|
||||||
language = language,
|
language = language,
|
||||||
quality = quality
|
quality = quality
|
||||||
))
|
))
|
||||||
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
if itemlist:
|
if itemlist:
|
||||||
itemlist.append(Item(channel=item.channel))
|
itemlist.append(Item(channel=item.channel))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import re
|
|||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from core import servertools
|
from core import servertools
|
||||||
|
from core import tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
@@ -31,8 +32,8 @@ def mainlist(item):
|
|||||||
url= host + "/calidad/hd-real-720", viewmode="movie_with_plot"))
|
url= host + "/calidad/hd-real-720", viewmode="movie_with_plot"))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, title=" Listado por género", action="porGenero", url= host))
|
Item(channel=item.channel, title=" Listado por género", action="porGenero", url= host))
|
||||||
itemlist.append(Item(channel=item.channel, title=" Buscar", action="search", url= host + "/?s="))
|
|
||||||
itemlist.append(Item(channel=item.channel, title=" Idioma", action="porIdioma", url= host))
|
itemlist.append(Item(channel=item.channel, title=" Idioma", action="porIdioma", url= host))
|
||||||
|
itemlist.append(Item(channel=item.channel, title=" Buscar", action="search", url= host + "/?s="))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ def porIdioma(item):
|
|||||||
itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas",
|
itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas",
|
||||||
url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot"))
|
url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot"))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, title="VOS", action="agregadas", url= host + "/idioma/subtitulada/",
|
Item(channel=item.channel, title="VOSE", action="agregadas", url= host + "/idioma/subtitulada/",
|
||||||
viewmode="movie_with_plot"))
|
viewmode="movie_with_plot"))
|
||||||
itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas",
|
itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas",
|
||||||
url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot"))
|
url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot"))
|
||||||
@@ -52,14 +53,10 @@ def porIdioma(item):
|
|||||||
|
|
||||||
def porGenero(item):
|
def porGenero(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)'
|
patron = 'cat-item.*?href="([^"]+).*?>(.*?)<.*?span>([^<]+)'
|
||||||
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for urlgen, genero, cantidad in matches:
|
for urlgen, genero, cantidad in matches:
|
||||||
cantidad = cantidad.replace(".", "")
|
cantidad = cantidad.replace(".", "")
|
||||||
titulo = genero + " (" + cantidad + ")"
|
titulo = genero + " (" + cantidad + ")"
|
||||||
@@ -73,10 +70,9 @@ def search(item, texto):
|
|||||||
logger.info()
|
logger.info()
|
||||||
texto_post = texto.replace(" ", "+")
|
texto_post = texto.replace(" ", "+")
|
||||||
item.url = host + "/?s=" + texto_post
|
item.url = host + "/?s=" + texto_post
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return listaBuscar(item)
|
return listaBuscar(item)
|
||||||
# Se captura la excepci?n, para no interrumpir al buscador global si un canal falla
|
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
@@ -87,12 +83,9 @@ def search(item, texto):
|
|||||||
def agregadas(item):
|
def agregadas(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}| |"', "", data)
|
data = re.sub(r'\n|\r|\t|\s{2}| |"', "", data)
|
||||||
|
|
||||||
patron = scrapertools.find_multiple_matches (data,'<divclass=col-mt-5 postsh>.*?Duración')
|
patron = scrapertools.find_multiple_matches (data,'<divclass=col-mt-5 postsh>.*?Duración')
|
||||||
|
|
||||||
for element in patron:
|
for element in patron:
|
||||||
info = scrapertools.find_single_match(element,
|
info = scrapertools.find_single_match(element,
|
||||||
"calidad>(.*?)<.*?ahref=(.*?)>.*?'reflectMe' src=(.*?)\/>.*?<h2>(.*?)"
|
"calidad>(.*?)<.*?ahref=(.*?)>.*?'reflectMe' src=(.*?)\/>.*?<h2>(.*?)"
|
||||||
@@ -103,28 +96,22 @@ def agregadas(item):
|
|||||||
title = info[3]
|
title = info[3]
|
||||||
plot = info[4]
|
plot = info[4]
|
||||||
year = info[5].strip()
|
year = info[5].strip()
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel=item.channel,
|
||||||
action='findvideos',
|
action='findvideos',
|
||||||
contentType = "movie",
|
contentType = "movie",
|
||||||
|
contentTitle = title,
|
||||||
fulltitle = title,
|
fulltitle = title,
|
||||||
infoLabels={'year':year},
|
infoLabels={'year':year},
|
||||||
plot=plot,
|
|
||||||
quality=quality,
|
quality=quality,
|
||||||
thumbnail=thumbnail,
|
thumbnail=thumbnail,
|
||||||
title=title,
|
title=title,
|
||||||
contentTitle = title,
|
|
||||||
url=url
|
url=url
|
||||||
))
|
))
|
||||||
# Paginación
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
try:
|
next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) ><i')
|
||||||
next_page = scrapertools.find_single_match(data,'tima>.*?href=(.*?) ><i')
|
itemlist.append(Item(channel=item.channel, action="agregadas", title='Pagina Siguiente >>',
|
||||||
|
url=next_page.strip(),
|
||||||
itemlist.append(Item(channel=item.channel, action="agregadas", title='Pagina Siguiente >>',
|
viewmode="movie_with_plot"))
|
||||||
url=next_page.strip(),
|
|
||||||
viewmode="movie_with_plot"))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -135,11 +122,9 @@ def listaBuscar(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
data = re.sub(r"\n", " ", data)
|
data = re.sub(r"\n", " ", data)
|
||||||
logger.info("data=" + data)
|
|
||||||
|
|
||||||
patron = 'class="row"> <a.*?="([^"]+).*?src="([^"]+).*?title="([^"]+).*?class="text-list">(.*?)</p>'
|
patron = 'class="row"> <a.*?="([^"]+).*?src="([^"]+).*?title="([^"]+).*?class="text-list">(.*?)</p>'
|
||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for url, thumbnail, title, sinopsis in matches:
|
for url, thumbnail, title, sinopsis in matches:
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url,
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title + " ", fulltitle=title, url=url,
|
||||||
@@ -150,17 +135,13 @@ def listaBuscar(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
plot = item.plot
|
|
||||||
|
|
||||||
# Descarga la pagina
|
# Descarga la pagina
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = 'cursor: hand" rel="(.*?)".*?class="optxt"><span>(.*?)<.*?width.*?class="q">(.*?)</span'
|
patron = 'cursor: hand" rel="(.*?)".*?class="optxt"><span>(.*?)<.*?width.*?class="q">(.*?)</span'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for scrapedurl, scrapedidioma, scrapedcalidad in matches:
|
for scrapedurl, scrapedidioma, scrapedcalidad in matches:
|
||||||
idioma = ""
|
|
||||||
title = "%s [" + scrapedcalidad + "][" + scrapedidioma +"]"
|
title = "%s [" + scrapedcalidad + "][" + scrapedidioma +"]"
|
||||||
if "youtube" in scrapedurl:
|
if "youtube" in scrapedurl:
|
||||||
scrapedurl += "&"
|
scrapedurl += "&"
|
||||||
@@ -168,16 +149,17 @@ def findvideos(item):
|
|||||||
language = scrapedidioma
|
language = scrapedidioma
|
||||||
if not ("omina.farlante1" in scrapedurl or "404" in scrapedurl):
|
if not ("omina.farlante1" in scrapedurl or "404" in scrapedurl):
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", title=title, fulltitle=item.title, url=scrapedurl,
|
item.clone(channel=item.channel, action="play", title=title, fulltitle=item.title, url=scrapedurl,
|
||||||
thumbnail=item.thumbnail, plot=plot, show=item.show, quality= quality, language=language, extra = item.thumbnail))
|
quality= quality, language=language, extra = item.thumbnail))
|
||||||
|
tmdb.set_infoLabels(itemlist, True)
|
||||||
itemlist=servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
itemlist=servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||||
# Opción "Añadir esta película a la biblioteca de KODI"
|
# Opción "Añadir esta película a la biblioteca de KODI"
|
||||||
if item.extra != "library":
|
if item.extra != "library":
|
||||||
if config.get_videolibrary_support():
|
if config.get_videolibrary_support():
|
||||||
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
itemlist.append(Item(channel=item.channel, title="Añadir a la videoteca", text_color="green",
|
||||||
filtro=True, action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||||
infoLabels={'title': item.fulltitle}, fulltitle=item.title,
|
fulltitle=item.title
|
||||||
extra="library"))
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ def findvideos(item):
|
|||||||
))
|
))
|
||||||
for videoitem in templist:
|
for videoitem in templist:
|
||||||
data = httptools.downloadpage(videoitem.url).data
|
data = httptools.downloadpage(videoitem.url).data
|
||||||
urls_list = scrapertools.find_multiple_matches(data, '({"type":.*?})')
|
urls_list = scrapertools.find_multiple_matches(data, '{"reorder":1,"type":.*?}')
|
||||||
for element in urls_list:
|
for element in urls_list:
|
||||||
json_data=jsontools.load(element)
|
json_data=jsontools.load(element)
|
||||||
|
|
||||||
@@ -253,6 +253,7 @@ def findvideos(item):
|
|||||||
|
|
||||||
new_url = 'https://onevideo.tv/api/player?key=90503e3de26d45e455b55e9dc54f015b3d1d4150&link' \
|
new_url = 'https://onevideo.tv/api/player?key=90503e3de26d45e455b55e9dc54f015b3d1d4150&link' \
|
||||||
'=%s&srt=%s' % (url, sub)
|
'=%s&srt=%s' % (url, sub)
|
||||||
|
logger.debug('new_url: %s' % new_url)
|
||||||
|
|
||||||
data = httptools.downloadpage(new_url).data
|
data = httptools.downloadpage(new_url).data
|
||||||
data = re.sub(r'\\', "", data)
|
data = re.sub(r'\\', "", data)
|
||||||
|
|||||||
@@ -176,27 +176,45 @@ def peliculas(item):
|
|||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches:
|
for scrapedurl, quality, year, scrapedtitle, scrapedthumbnail in matches:
|
||||||
datas = httptools.downloadpage(scrapedurl).data
|
|
||||||
datas = re.sub(r"\n|\r|\t|\s{2}| ", "", datas)
|
|
||||||
# logger.info(datas)
|
|
||||||
if '/ ' in scrapedtitle:
|
if '/ ' in scrapedtitle:
|
||||||
scrapedtitle = scrapedtitle.partition('/ ')[2]
|
scrapedtitle = scrapedtitle.partition('/ ')[2]
|
||||||
contentTitle = scrapertools.find_single_match(datas, '<em class="pull-left">Titulo original: </em>([^<]+)</p>')
|
title = scrapedtitle
|
||||||
contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip())
|
contentTitle = title
|
||||||
rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" /></a><span>([^<]+)</span>')
|
url = scrapedurl
|
||||||
director = scrapertools.find_single_match(
|
quality = quality
|
||||||
datas, '<div class="list-cast-info tableCell"><a href="[^"]+" rel="tag">([^<]+)</a></div>')
|
thumbnail = scrapedthumbnail
|
||||||
title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper())
|
|
||||||
|
|
||||||
new_item = Item(channel=item.channel, action="findvideos", title=title, plot='', contentType='movie',
|
itemlist.append(Item(channel=item.channel,
|
||||||
url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail,
|
action="findvideos",
|
||||||
contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director},
|
title=title, url=url,
|
||||||
text_color=color3)
|
quality=quality,
|
||||||
|
thumbnail=thumbnail,
|
||||||
|
contentTitle=contentTitle,
|
||||||
|
infoLabels={"year": year},
|
||||||
|
text_color=color3
|
||||||
|
))
|
||||||
|
|
||||||
if year:
|
# for scrapedurl, calidad, year, scrapedtitle, scrapedthumbnail in matches:
|
||||||
tmdb.set_infoLabels_item(new_item, __modo_grafico__)
|
# datas = httptools.downloadpage(scrapedurl).data
|
||||||
itemlist.append(new_item)
|
# datas = re.sub(r"\n|\r|\t|\s{2}| ", "", datas)
|
||||||
|
# # logger.info(datas)
|
||||||
|
# if '/ ' in scrapedtitle:
|
||||||
|
# scrapedtitle = scrapedtitle.partition('/ ')[2]
|
||||||
|
# contentTitle = scrapertools.find_single_match(datas, '<em class="pull-left">Titulo original: </em>([^<]+)</p>')
|
||||||
|
# contentTitle = scrapertools.decodeHtmlentities(contentTitle.strip())
|
||||||
|
# rating = scrapertools.find_single_match(datas, 'alt="Puntaje MPA IMDb" /></a><span>([^<]+)</span>')
|
||||||
|
# director = scrapertools.find_single_match(
|
||||||
|
# datas, '<div class="list-cast-info tableCell"><a href="[^"]+" rel="tag">([^<]+)</a></div>')
|
||||||
|
# title = "%s [COLOR yellow][%s][/COLOR]" % (scrapedtitle.strip(), calidad.upper())
|
||||||
|
#
|
||||||
|
# logger.debug('thumbnail: %s' % scrapedthumbnail)
|
||||||
|
# new_item = Item(channel=item.channel, action="findvideos", title=title, plot='', contentType='movie',
|
||||||
|
# url=scrapedurl, contentQuality=calidad, thumbnail=scrapedthumbnail,
|
||||||
|
# contentTitle=contentTitle, infoLabels={"year": year, 'rating': rating, 'director': director},
|
||||||
|
# text_color=color3)
|
||||||
|
# itemlist.append(new_item)
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||||
|
|
||||||
paginacion = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
|
paginacion = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||||
if paginacion:
|
if paginacion:
|
||||||
@@ -267,13 +285,13 @@ def findvideos(item):
|
|||||||
|
|
||||||
if 'drive' not in servidores and 'streamvips' not in servidores and 'mediastream' not in servidores:
|
if 'drive' not in servidores and 'streamvips' not in servidores and 'mediastream' not in servidores:
|
||||||
if 'ultrastream' not in servidores:
|
if 'ultrastream' not in servidores:
|
||||||
server = servertools.get_server_from_url('scrapedurl')
|
server = servertools.get_server_from_url(scrapedurl)
|
||||||
quality = scrapertools.find_single_match(
|
quality = scrapertools.find_single_match(
|
||||||
datas, '<p class="hidden-xs hidden-sm">.*?class="magnet-download">([^<]+)p</a>')
|
datas, '<p class="hidden-xs hidden-sm">.*?class="magnet-download">([^<]+)p</a>')
|
||||||
title = "Ver en: [COLOR yellowgreen][{}][/COLOR] [COLOR yellow][{}][/COLOR]".format(servidores.capitalize(),
|
title = "Ver en: [COLOR yellowgreen][{}][/COLOR] [COLOR yellow][{}][/COLOR]".format(servidores.capitalize(),
|
||||||
quality.upper())
|
quality.upper())
|
||||||
|
|
||||||
itemlist.append(item.clone(action='play', title=title, url='url', quality=item.quality,
|
itemlist.append(item.clone(action='play', title=title, url=scrapedurl, quality=item.quality,
|
||||||
server=server, language=lang.replace('Español ', ''),
|
server=server, language=lang.replace('Español ', ''),
|
||||||
text_color=color3, thumbnail=item.thumbnail))
|
text_color=color3, thumbnail=item.thumbnail))
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "pordede",
|
"id": "pordede",
|
||||||
"name": "Pordede",
|
"name": "Pordede",
|
||||||
"active": true,
|
"active": false,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["cast"],
|
"language": ["cast"],
|
||||||
"thumbnail": "pordede.png",
|
"thumbnail": "pordede.png",
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "pymovie",
|
|
||||||
"name": "pymovie",
|
|
||||||
"active": true,
|
|
||||||
"adult": false,
|
|
||||||
"language": ["cast", "lat"],
|
|
||||||
"thumbnail": "https://s27.postimg.org/hvmvz7vab/pymovie.png",
|
|
||||||
"banner": "https://s28.postimg.org/3k0wjnwul/pymovie_banner.png",
|
|
||||||
"version": 1,
|
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"date": "25/05/2017",
|
|
||||||
"description": "cambios esteticos"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "15/03/2017",
|
|
||||||
"description": "limpieza código"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "04/01/2017",
|
|
||||||
"description": "Release."
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"categories": [
|
|
||||||
"movie",
|
|
||||||
"tvshow",
|
|
||||||
"documentary"
|
|
||||||
],
|
|
||||||
"settings": [
|
|
||||||
{
|
|
||||||
"id": "include_in_global_search",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Incluir en busqueda global",
|
|
||||||
"default": false,
|
|
||||||
"enabled": false,
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_peliculas",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Incluir en Novedades - Peliculas",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_infantiles",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Incluir en Novedades - Infantiles",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "include_in_newest_documentales",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Incluir en Novedades - Documentales",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,399 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import re
|
|
||||||
|
|
||||||
from core import httptools
|
|
||||||
from core import scrapertools
|
|
||||||
from core import servertools
|
|
||||||
from core.item import Item
|
|
||||||
from platformcode import config, logger
|
|
||||||
|
|
||||||
host = "http://www.pymovie.com.mx"
|
|
||||||
|
|
||||||
headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
|
||||||
['Referer', host]]
|
|
||||||
|
|
||||||
tgenero = {"comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
|
||||||
"drama": "https://s16.postimg.org/94sia332d/drama.png",
|
|
||||||
"accion": "https://s3.postimg.org/y6o9puflv/accion.png",
|
|
||||||
"aventura": "https://s10.postimg.org/6su40czih/aventura.png",
|
|
||||||
"romance": "https://s15.postimg.org/fb5j8cl63/romance.png",
|
|
||||||
"animacion": "https://s13.postimg.org/5on877l87/animacion.png",
|
|
||||||
"ciencia ficcion": "https://s9.postimg.org/diu70s7j3/cienciaficcion.png",
|
|
||||||
"terror": "https://s7.postimg.org/yi0gij3gb/terror.png",
|
|
||||||
"musical": "https://s29.postimg.org/bbxmdh9c7/musical.png",
|
|
||||||
"deporte": "https://s13.postimg.org/xuxf5h06v/deporte.png",
|
|
||||||
"artes Marciales": "https://s24.postimg.org/w1aw45j5h/artesmarciales.png",
|
|
||||||
"intriga": "https://s27.postimg.org/v9og43u2b/intriga.png",
|
|
||||||
"infantil": "https://s23.postimg.org/g5rmazozv/infantil.png",
|
|
||||||
"mexicanas": "https://s3.postimg.org/p36ntnxfn/mexicana.png",
|
|
||||||
"espionaje": "https://s2.postimg.org/5hv64b989/espionaje.png",
|
|
||||||
"biografia": "https://s15.postimg.org/5lrpbx323/biografia.png"}
|
|
||||||
|
|
||||||
tcalidad = {'hd-1080': '[COLOR limegreen]HD-1080[/COLOR]', 'hd-720': '[COLOR limegreen]HD-720[/COLOR]',
|
|
||||||
'blueray': '[COLOR limegreen]BLUERAY[/COLOR]', 'dvd': '[COLOR limegreen]DVD[/COLOR]',
|
|
||||||
'cam': '[COLOR red]CAM[/COLOR]'}
|
|
||||||
|
|
||||||
tcalidad2 = {'hd-1080': 'https://s21.postimg.org/4h1s0t1wn/hd1080.png',
|
|
||||||
'hd-720': 'https://s12.postimg.org/lthu7v4q5/hd720.png', 'blueray': '',
|
|
||||||
'dvd': 'https://s1.postimg.org/m89hus1tb/dvd.png', 'cam': 'https://s11.postimg.org/ad4o5wpz7/cam.png'}
|
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
|
||||||
logger.info()
|
|
||||||
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
itemlist.append(item.clone(title="Peliculas", action="menupeliculas",
|
|
||||||
thumbnail='https://s8.postimg.org/6wqwy2c2t/peliculas.png',
|
|
||||||
fanart='https://s8.postimg.org/6wqwy2c2t/peliculas.png', extra='peliculas/'))
|
|
||||||
|
|
||||||
itemlist.append(itemlist[-1].clone(title="Series", action="menuseries",
|
|
||||||
thumbnail='https://s27.postimg.org/iahczwgrn/series.png',
|
|
||||||
fanart='https://s27.postimg.org/iahczwgrn/series.png', extra='peliculas/'))
|
|
||||||
|
|
||||||
itemlist.append(itemlist[-1].clone(title="Documentales", action="menudocumental",
|
|
||||||
thumbnail='https://s16.postimg.org/7xjj4bmol/documental.png',
|
|
||||||
fanart='https://s16.postimg.org/7xjj4bmol/documental.png', extra='documental'))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def menupeliculas(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Ultimas", action="lista", url=host + '/Ordenar/Estreno/?page=1',
|
|
||||||
thumbnail='https://s22.postimg.org/cb7nmhwv5/ultimas.png',
|
|
||||||
fanart='https://s22.postimg.org/cb7nmhwv5/ultimas.png', extra='Estreno'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Todas", action="lista", url=host + '?page=1',
|
|
||||||
thumbnail='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
|
||||||
fanart='https://s18.postimg.org/fwvaeo6qh/todas.png', extra='todas'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Generos", action="seccion", url=host,
|
|
||||||
thumbnail='https://s3.postimg.org/5s9jg2wtf/generos.png',
|
|
||||||
fanart='https://s3.postimg.org/5s9jg2wtf/generos.png', extra='generos'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Alfabetico", action="lista", url=host + '/Ordenar/Alfabetico/?page=1',
|
|
||||||
thumbnail='https://s17.postimg.org/fwi1y99en/a-z.png', fanart='https://s17.postimg.org/fwi1y99en/a-z.png',
|
|
||||||
extra='Alfabetico'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Calidad", action="seccion", url=host,
|
|
||||||
thumbnail='https://s13.postimg.org/6nzv8nlkn/calidad.png',
|
|
||||||
fanart='https://s13.postimg.org/6nzv8nlkn/calidad.png', extra='calidad'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Mas Vistas", action="lista", url=host + '/Ordenar/MasVistas/?page=1',
|
|
||||||
thumbnail='https://s9.postimg.org/wmhzu9d7z/vistas.png',
|
|
||||||
fanart='https://s9.postimg.org/wmhzu9d7z/vistas.png', extra='Estreno'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Mas Votadas", action="lista", url=host + '/Ordenar/MasVotos/?page=1',
|
|
||||||
thumbnail='https://s7.postimg.org/9kg1nthzf/votadas.png',
|
|
||||||
fanart='https://s7.postimg.org/9kg1nthzf/votadas.png', extra='Estreno'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Calificacion", action="lista", url=host + '/Ordenar/Calificacion/?page=1',
|
|
||||||
thumbnail='https://s18.postimg.org/mjqrl49h5/calificacion.png',
|
|
||||||
fanart='https://s18.postimg.org/mjqrl49h5/calificacion.png', extra='Estreno'))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def menuseries(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Ultimas", action="lista", url=host + "/Series-estreno/?page=1",
|
|
||||||
thumbnail='https://s22.postimg.org/cb7nmhwv5/ultimas.png',
|
|
||||||
fanart='https://s22.postimg.org/cb7nmhwv5/ultimas.png', extra='series'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Generos", action="seccion", url=host,
|
|
||||||
thumbnail='https://s3.postimg.org/5s9jg2wtf/generos.png',
|
|
||||||
fanart='https://s3.postimg.org/5s9jg2wtf/generos.png', extra='series-generos'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Alfabetico", action="lista", url=host + '/Ordernar-Serie/Alfabetico/?page=1',
|
|
||||||
thumbnail='https://s17.postimg.org/fwi1y99en/a-z.png', fanart='https://s17.postimg.org/fwi1y99en/a-z.png',
|
|
||||||
extra='series-alpha'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Mas Vistas", action="lista", url=host + '/Ordernar-Serie/MasVistas/?page=1',
|
|
||||||
thumbnail='https://s9.postimg.org/wmhzu9d7z/vistas.png',
|
|
||||||
fanart='https://s9.postimg.org/wmhzu9d7z/vistas.png', extra='series-masvistas'))
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title="Mas Votadas", action="lista", url=host + '/Ordernar-Serie/Masvotos/?page=1',
|
|
||||||
thumbnail='https://s7.postimg.org/9kg1nthzf/votadas.png',
|
|
||||||
fanart='https://s7.postimg.org/9kg1nthzf/votadas.png', extra='series-masvotadas'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Recomendadas", action="lista",
|
|
||||||
url=host + '/Ordernar-Serie/Recomendadas/?page=1',
|
|
||||||
thumbnail='https://s12.postimg.org/s881laywd/recomendadas.png',
|
|
||||||
fanart='https://s12.postimg.org/s881laywd/recomendadas.png', extra='series-recomendadas'))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def menudocumental(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Todas", action="lista", url=host + "/Documentales/?page=1",
|
|
||||||
thumbnail='https://s18.postimg.org/fwvaeo6qh/todas.png',
|
|
||||||
fanart='https://s18.postimg.org/fwvaeo6qh/todas.png', extra='documental'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Alfabetico", action="lista",
|
|
||||||
url=host + "/OrdenarDocumental/Alfabetico/?page=1",
|
|
||||||
thumbnail='https://s17.postimg.org/fwi1y99en/a-z.png',
|
|
||||||
fanart='https://s17.postimg.org/fwi1y99en/a-z.png', extra='documental'))
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, title="Mas Vistas", action="lista",
|
|
||||||
url=host + "/OrdenarDocumental/MasVistas/?page=1",
|
|
||||||
thumbnail='https://s9.postimg.org/wmhzu9d7z/vistas.png',
|
|
||||||
fanart='https://s9.postimg.org/wmhzu9d7z/vistas.png', extra='documental'))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def lista(item):
|
|
||||||
logger.info()
|
|
||||||
|
|
||||||
if item.extra == 'series':
|
|
||||||
accion = 'episodiosxtemp'
|
|
||||||
elif 'series-' in item.extra:
|
|
||||||
accion = 'temporadas'
|
|
||||||
else:
|
|
||||||
accion = 'findvideos'
|
|
||||||
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
if 'series' in item.extra or item.extra == 'documental':
|
|
||||||
patron = '<h2 itemprop="name" >([^<]+)<\/h2><a href="([^.]+)" title=".*?" ><img.*?src="([^"]+)".*?class=".*?boren2"\/([^<]+)'
|
|
||||||
else:
|
|
||||||
patron = '<h2 itemprop="name" >([^<]+)<\/h2><a href="([^.]+)" title=".*?" ><img.*?src="([^"]+)".*?class=".*?boren2".*?>([^<]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedtitle, scrapedurl, scrapedthumbnail, scrapedcalidad in matches:
|
|
||||||
url = scrapertools.decodeHtmlentities(host + scrapedurl)
|
|
||||||
url = url.strip(' ')
|
|
||||||
|
|
||||||
scrapedcalidad = scrapedcalidad.strip(' ')
|
|
||||||
scrapedcalidad = scrapedcalidad.strip('p')
|
|
||||||
scrapedcalidad = scrapedcalidad.lower()
|
|
||||||
if 'series' in item.extra or item.extra == 'documental':
|
|
||||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
else:
|
|
||||||
calidad = tcalidad[scrapedcalidad]
|
|
||||||
title = scrapertools.decodeHtmlentities(scrapedtitle) + ' (' + calidad + ') '
|
|
||||||
|
|
||||||
thumbnail = scrapedthumbnail
|
|
||||||
fanart = ''
|
|
||||||
plot = ''
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action=accion, title=title, url=url, thumbnail=thumbnail, plot=plot,
|
|
||||||
fanart=fanart, contentSerieName=scrapedtitle, contentTitle=scrapedtitle, extra=item.extra))
|
|
||||||
|
|
||||||
# Paginacion
|
|
||||||
if itemlist != []:
|
|
||||||
actual_page_url = item.url
|
|
||||||
next_page = scrapertools.find_single_match(data, '<a href="\?page=([^"]+)" class="next">next &')
|
|
||||||
while item.url[-1] != '=':
|
|
||||||
item.url = item.url[:-1]
|
|
||||||
next_page_url = item.url + next_page
|
|
||||||
if next_page != '':
|
|
||||||
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=next_page_url,
|
|
||||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png', extra=item.extra))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def temporadas(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
templist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
patron = 'class="listatemporadas" ><a href="([^"]+)" title=".*?" ><img src="([^"]+)" width="80" height="100" title=".*?alt=".*?<h3>([^<]+)<'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
|
||||||
url = host + scrapedurl
|
|
||||||
title = scrapedtitle
|
|
||||||
thumbnail = scrapedthumbnail
|
|
||||||
plot = ''
|
|
||||||
fanart = ''
|
|
||||||
contentSeasonNumber = scrapedtitle.replace('Temporada ', '')
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="episodiosxtemp", title=title, fulltitle=item.title, url=url,
|
|
||||||
thumbnail=thumbnail, plot=plot, fanart=fanart, contentSerieName=item.contentSerieName,
|
|
||||||
contentSeasonNumber=contentSeasonNumber))
|
|
||||||
|
|
||||||
if item.extra == 'temporadas':
|
|
||||||
for tempitem in itemlist:
|
|
||||||
templist += episodiosxtemp(tempitem)
|
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', url=item.url,
|
|
||||||
action="add_serie_to_library", extra="episodios", contentSerieName=item.contentSerieName))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
templist = temporadas(item)
|
|
||||||
for tempitem in templist:
|
|
||||||
itemlist += episodiosxtemp(tempitem)
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def episodiosxtemp(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = '<a href="\/VerCapitulo\/([^"]+)">'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
ep = 1
|
|
||||||
for scrapedtitle in matches:
|
|
||||||
scrapedtitle = scrapedtitle.replace(item.contentSeasonNumber + 'x' + '0' + str(ep), '')
|
|
||||||
url = host + '/VerCapitulo/' + scrapedtitle.replace(' ', '-')
|
|
||||||
title = item.contentSeasonNumber + 'x' + str(ep) + ' ' + scrapedtitle.strip('/')
|
|
||||||
|
|
||||||
thumbnail = item.thumbnail
|
|
||||||
plot = ''
|
|
||||||
fanart = ''
|
|
||||||
plot = ''
|
|
||||||
contentEpisodeNumber = ep
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=item.title, url=url,
|
|
||||||
thumbnail=thumbnail, plot=plot, fanart=fanart, extra='series',
|
|
||||||
contentSerieName=item.contentSerieName, contentSeasonNumber=item.contentSeasonNumber,
|
|
||||||
contentEpisodeNumber=contentEpisodeNumber))
|
|
||||||
ep = ep + 1
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def seccion(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = '<option class="opselect" value="([^"]+)".*?>([^<]+)<\/option>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
if item.extra == 'generos':
|
|
||||||
oplista = tgenero
|
|
||||||
opdir = '/Categoria/'
|
|
||||||
elif item.extra == 'calidad':
|
|
||||||
oplista = tcalidad
|
|
||||||
opdir = '/Calidad/'
|
|
||||||
elif item.extra == 'series-generos':
|
|
||||||
oplista = tgenero
|
|
||||||
opdir = '/Categoria-Series/'
|
|
||||||
|
|
||||||
for scrapeddir, scrapedtitle in matches:
|
|
||||||
|
|
||||||
url = item.url + opdir + scrapeddir + '/?page=1'
|
|
||||||
title = scrapedtitle.upper()
|
|
||||||
|
|
||||||
if 'generos' in item.extra and scrapedtitle.lower() in oplista:
|
|
||||||
thumbnail = oplista[scrapedtitle.lower()]
|
|
||||||
fanart = oplista[scrapedtitle.lower()]
|
|
||||||
|
|
||||||
elif 'calidad' in item.extra and scrapedtitle.lower() in oplista:
|
|
||||||
thumbnail = tcalidad2[scrapedtitle.lower()]
|
|
||||||
fanart = tcalidad[scrapedtitle.lower()]
|
|
||||||
|
|
||||||
else:
|
|
||||||
thumbnail = ''
|
|
||||||
fanart = ''
|
|
||||||
|
|
||||||
if scrapedtitle.lower() in oplista:
|
|
||||||
itemlist.append(Item(channel=item.channel, action="lista", title=title, fulltitle=item.title, url=url,
|
|
||||||
thumbnail=thumbnail, fanart=fanart, extra=item.extra))
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
audio = {'Latino': '[COLOR limegreen]LATINO[/COLOR]', 'Español': '[COLOR yellow]ESPAÑOL[/COLOR]',
|
|
||||||
'Ingles': '[COLOR red]ORIGINAL SUBTITULADO[/COLOR]', 'Latino-Ingles': 'DUAL'}
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
if item.extra != 'series':
|
|
||||||
patron = 'data-video="([^"]+)" class="reproductorVideo"><ul><li>([^<]+)<\/li><li>([^<]+)<\/li>'
|
|
||||||
tipotitle = item.contentTitle
|
|
||||||
elif item.extra == 'series':
|
|
||||||
tipotitle = str(item.contentSeasonNumber) + 'x' + str(item.contentEpisodeNumber) + ' ' + item.contentSerieName
|
|
||||||
patron = '<li class="enlaces-l"><a href="([^"]+)" target="_blank"><ul><li>([^<]+)<.*?>([^<]+)<.*?>Reproducir<'
|
|
||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
if item.extra != 'documental':
|
|
||||||
n = 0
|
|
||||||
|
|
||||||
for scrapedurl, scrapedcalidad, scrapedaudio in matches:
|
|
||||||
if 'series' in item.extra:
|
|
||||||
datab = httptools.downloadpage(host + scrapedurl).data
|
|
||||||
url = scrapertools.find_single_match(datab, 'class="reproductor"><iframe src="([^"]+)"')
|
|
||||||
print url + 'esta es la direccion'
|
|
||||||
else:
|
|
||||||
url = scrapedurl
|
|
||||||
|
|
||||||
title = tipotitle
|
|
||||||
idioma = audio[scrapedaudio]
|
|
||||||
itemlist.extend(servertools.find_video_items(data=url))
|
|
||||||
if n < len(itemlist):
|
|
||||||
itemlist[n].title = tipotitle + ' (' + idioma + ' ) ' + '(' + itemlist[n].server + ' )'
|
|
||||||
n = n + 1
|
|
||||||
else:
|
|
||||||
url = scrapertools.find_single_match(data, 'class="reproductor"><iframe src="([^"]+)"')
|
|
||||||
itemlist.extend(servertools.find_video_items(data=url))
|
|
||||||
|
|
||||||
for videoitem in itemlist:
|
|
||||||
if item.extra == 'documental':
|
|
||||||
videoitem.title = item.title + ' (' + videoitem.server + ')'
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
videoitem.action = "play"
|
|
||||||
videoitem.folder = False
|
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'series':
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel, title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]', url=item.url,
|
|
||||||
action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
item = Item()
|
|
||||||
item.extra = 'Estrenos'
|
|
||||||
try:
|
|
||||||
if categoria == 'peliculas':
|
|
||||||
item.url = host + '/Ordenar/Estreno/?page=1'
|
|
||||||
|
|
||||||
elif categoria == 'infantiles':
|
|
||||||
item.url = host + '/Categoria/Animacion/?page=1'
|
|
||||||
|
|
||||||
elif categoria == 'documentales':
|
|
||||||
item.url = host + '/Documentales/?page=1'
|
|
||||||
item.extra = 'documental'
|
|
||||||
|
|
||||||
itemlist = lista(item)
|
|
||||||
if itemlist[-1].title == 'Siguiente >>>':
|
|
||||||
itemlist.pop()
|
|
||||||
except:
|
|
||||||
import sys
|
|
||||||
for line in sys.exc_info():
|
|
||||||
logger.error("{0}".format(line))
|
|
||||||
return []
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import urlparse
|
|
||||||
|
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from core import servertools
|
from core import servertools
|
||||||
@@ -10,58 +9,57 @@ from core import tmdb
|
|||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
|
||||||
|
host = "http://www.repelis.tv"
|
||||||
|
|
||||||
# Main list manual
|
# Main list manual
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
item.url = "http://www.repelis.tv/pag/1"
|
|
||||||
|
|
||||||
mifan = "http://www.psicocine.com/wp-content/uploads/2013/08/Bad_Robot_Logo.jpg"
|
mifan = "http://www.psicocine.com/wp-content/uploads/2013/08/Bad_Robot_Logo.jpg"
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Peliculas", url="http://www.repelis.tv/pag/1",
|
itemlist.append(Item(channel=item.channel, action="menupelis", title="Peliculas", url= host + "/pag/1",
|
||||||
thumbnail="http://www.gaceta.es/sites/default/files/styles/668x300/public"
|
thumbnail="http://www.gaceta.es/sites/default/files/styles/668x300/public"
|
||||||
"/metro_goldwyn_mayer_1926-web.png?itok=-lRSR9ZC",
|
"/metro_goldwyn_mayer_1926-web.png?itok=-lRSR9ZC",
|
||||||
fanart=mifan))
|
fanart=mifan))
|
||||||
itemlist.append(Item(channel=item.channel, action="menuestre", title="Estrenos",
|
itemlist.append(Item(channel=item.channel, action="menuestre", title="Estrenos",
|
||||||
url="http://www.repelis.tv/archivos/estrenos/pag/1",
|
url= host + "/archivos/estrenos/pag/1",
|
||||||
thumbnail="http://t0.gstatic.com/images?q=tbn"
|
thumbnail="http://t0.gstatic.com/images?q=tbn"
|
||||||
":ANd9GcS4g68rmeLQFuX7iCrPwd00FI_OlINZXCYXEFrJHTZ0VSHefIIbaw",
|
":ANd9GcS4g68rmeLQFuX7iCrPwd00FI_OlINZXCYXEFrJHTZ0VSHefIIbaw",
|
||||||
fanart=mifan))
|
fanart=mifan))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="menudesta", title="Destacadas", url="http://www.repelis.tv/pag/1",
|
Item(channel=item.channel, action="menudesta", title="Destacadas", url= host + "/pag/1",
|
||||||
thumbnail="http://img.irtve.es/v/1074982/", fanart=mifan))
|
thumbnail="http://img.irtve.es/v/1074982/", fanart=mifan))
|
||||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Proximos estrenos",
|
itemlist.append(Item(channel=item.channel, action="menupelis", title="Proximos estrenos",
|
||||||
url="http://www.repelis.tv/archivos/proximos-estrenos/pag/1",
|
url= host + "/archivos/proximos-estrenos/pag/1",
|
||||||
thumbnail="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTpsRC"
|
thumbnail="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTpsRC"
|
||||||
"-GTYzCqhor2gIDfAB61XeymwgXWSVBHoRAKs2c5HAn29f&reload=on",
|
"-GTYzCqhor2gIDfAB61XeymwgXWSVBHoRAKs2c5HAn29f&reload=on",
|
||||||
fanart=mifan))
|
fanart=mifan))
|
||||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Todas las Peliculas",
|
itemlist.append(Item(channel=item.channel, action="menupelis", title="Todas las Peliculas",
|
||||||
url="http://www.repelis.tv/pag/1",
|
url= host + "/pag/1",
|
||||||
thumbnail="https://freaksociety.files.wordpress.com/2012/02/logos-cine.jpg", fanart=mifan))
|
thumbnail="https://freaksociety.files.wordpress.com/2012/02/logos-cine.jpg", fanart=mifan))
|
||||||
|
|
||||||
if config.get_setting("adult_mode") != 0:
|
if config.get_setting("adult_mode") != 0:
|
||||||
itemlist.append(Item(channel=item.channel, action="menupelis", title="Eroticas +18",
|
itemlist.append(Item(channel=item.channel, action="menupelis", title="Eroticas +18",
|
||||||
url="http://www.repelis.tv/genero/eroticas/pag/1",
|
url= host + "/genero/eroticas/pag/1",
|
||||||
thumbnail="http://www.topkamisetas.com/catalogo/images/TB0005.gif",
|
thumbnail="http://www.topkamisetas.com/catalogo/images/TB0005.gif",
|
||||||
fanart="http://www.topkamisetas.com/catalogo/images/TB0005.gif", extra='adult'))
|
fanart="http://www.topkamisetas.com/catalogo/images/TB0005.gif", extra='adult'))
|
||||||
# Quito la busqueda por año si no esta enabled el adultmode, porque no hay manera de filtrar los enlaces
|
# Quito la busqueda por año si no esta enabled el adultmode, porque no hay manera de filtrar los enlaces
|
||||||
# eroticos72
|
# eroticos72
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="poranyo", title="Por Año", url="http://www.repelis.tv/anio/2016",
|
Item(channel=item.channel, action="poranyo", title="Por Año", url= host + "/anio/2016",
|
||||||
thumbnail="http://t3.gstatic.com/images?q=tbn:ANd9GcSkxiYXdBcI0cvBLsb_nNlz_dWXHRl2Q"
|
thumbnail="http://t3.gstatic.com/images?q=tbn:ANd9GcSkxiYXdBcI0cvBLsb_nNlz_dWXHRl2Q"
|
||||||
"-ER9dPnP1gNUudhrqlR",
|
"-ER9dPnP1gNUudhrqlR",
|
||||||
fanart=mifan))
|
fanart=mifan))
|
||||||
|
|
||||||
# Por categoria si que filtra la categoria de eroticos
|
# Por categoria si que filtra la categoria de eroticos
|
||||||
itemlist.append(Item(channel=item.channel, action="porcateg", title="Por Categoria",
|
itemlist.append(Item(channel=item.channel, action="porcateg", title="Por Categoria",
|
||||||
url="http://www.repelis.tv/genero/accion/pag/1",
|
url= host + "/genero/accion/pag/1",
|
||||||
thumbnail="http://www.logopro.it/blog/wp-content/uploads/2013/07/categoria-sigaretta"
|
thumbnail="http://www.logopro.it/blog/wp-content/uploads/2013/07/categoria-sigaretta"
|
||||||
"-elettronica.png",
|
"-elettronica.png",
|
||||||
fanart=mifan))
|
fanart=mifan))
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="search", title="Buscar...", url="http://www.repelis.tv/search/?s=",
|
Item(channel=item.channel, action="search", title="Buscar...", url= host + "/search/?s=",
|
||||||
thumbnail="http://thumbs.dreamstime.com/x/buscar-pistas-13159747.jpg", fanart=mifan))
|
thumbnail="http://thumbs.dreamstime.com/x/buscar-pistas-13159747.jpg", fanart=mifan))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -70,9 +68,7 @@ def mainlist(item):
|
|||||||
|
|
||||||
def menupelis(item):
|
def menupelis(item):
|
||||||
logger.info(item.url)
|
logger.info(item.url)
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||||
|
|
||||||
if item.extra == '':
|
if item.extra == '':
|
||||||
@@ -85,8 +81,6 @@ def menupelis(item):
|
|||||||
section = 'de %s'%item.extra
|
section = 'de %s'%item.extra
|
||||||
|
|
||||||
patronenlaces = '<h.>Películas %s<\/h.>.*?>(.*?)<\/section>'%section
|
patronenlaces = '<h.>Películas %s<\/h.>.*?>(.*?)<\/section>'%section
|
||||||
|
|
||||||
|
|
||||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for bloque_enlaces in matchesenlaces:
|
for bloque_enlaces in matchesenlaces:
|
||||||
@@ -97,25 +91,18 @@ def menupelis(item):
|
|||||||
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
matches = re.compile(patron, re.DOTALL).findall(bloque_enlaces)
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
||||||
logger.info("He encontrado el segundo bloque")
|
|
||||||
logger.info("extra_info: %s" % extra_info)
|
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "");
|
title = title.replace("Online", "");
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = scrapedurl
|
||||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
thumbnail = scrapedthumbnail
|
||||||
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
||||||
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
||||||
language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"')
|
language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"')
|
||||||
# if language = 'ingles':
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||||
# language='vo'
|
thumbnail=thumbnail, language=language, quality=quality,
|
||||||
new_item=Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
infoLabels={'year': year}))
|
||||||
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
|
||||||
infoLabels={'year': year})
|
|
||||||
if year:
|
|
||||||
tmdb.set_infoLabels_item(new_item)
|
|
||||||
|
|
||||||
itemlist.append(new_item)
|
|
||||||
|
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
try:
|
try:
|
||||||
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
||||||
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
||||||
@@ -139,9 +126,6 @@ def menudesta(item):
|
|||||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for bloque_enlaces in matchesenlaces:
|
for bloque_enlaces in matchesenlaces:
|
||||||
|
|
||||||
# patron = '<a href="([^"]+)" title="([^"]+)"> <div class="poster".*?<img src="([^"]+)"'
|
|
||||||
|
|
||||||
patron = '<div class="poster-media-card">.*?'
|
patron = '<div class="poster-media-card">.*?'
|
||||||
patron += '<a href="(.*?)".*?title="(.*?)".*?'
|
patron += '<a href="(.*?)".*?title="(.*?)".*?'
|
||||||
patron += '<img src="(.*?)"'
|
patron += '<img src="(.*?)"'
|
||||||
@@ -150,11 +134,10 @@ def menudesta(item):
|
|||||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "");
|
title = title.replace("Online", "");
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = scrapedurl
|
||||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
thumbnail = scrapedthumbnail
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||||
thumbnail=thumbnail, fanart=thumbnail))
|
thumbnail=thumbnail, fanart = thumbnail))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -180,8 +163,8 @@ def menuestre(item):
|
|||||||
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
for scrapedurl, scrapedtitle, extra_info, scrapedthumbnail in matches:
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "");
|
title = title.replace("Online", "");
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = scrapedurl
|
||||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
thumbnail = scrapedthumbnail
|
||||||
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
quality = scrapertools.find_single_match(extra_info, 'calidad.*?>Calidad (.*?)<')
|
||||||
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
year = scrapertools.find_single_match(extra_info, '"anio">(\d{4})<')
|
||||||
language = scrapertools.find_single_match(extra_info, 'class="(latino|espanol|subtitulado)"')
|
language = scrapertools.find_single_match(extra_info, 'class="(latino|espanol|subtitulado)"')
|
||||||
@@ -190,10 +173,6 @@ def menuestre(item):
|
|||||||
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
||||||
infoLabels={'year': year}))
|
infoLabels={'year': year}))
|
||||||
|
|
||||||
## Paginación
|
|
||||||
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
|
||||||
|
|
||||||
# Si falla no muestra ">> Página siguiente"
|
|
||||||
try:
|
try:
|
||||||
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
|
||||||
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
title = "[COLOR red][B]Pagina siguiente »[/B][/COLOR]"
|
||||||
@@ -205,48 +184,25 @@ def menuestre(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info(item.url)
|
logger.info(item.url)
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||||
|
|
||||||
patron = '<h2>Sinopsis</h2>.*?<p>(.*?)</p>.*?<div id="informacion".*?</h2>.*?<p>(.*?)</p>' # titulo
|
patron = '<h2>Sinopsis</h2>.*?<p>(.*?)</p>.*?<div id="informacion".*?</h2>.*?<p>(.*?)</p>' # titulo
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for sinopsis, title in matches:
|
for sinopsis, title in matches:
|
||||||
title = "[COLOR white][B]" + title + "[/B][/COLOR]"
|
title = "[COLOR white][B]" + title + "[/B][/COLOR]"
|
||||||
|
|
||||||
patron = '<div id="informacion".*?>(.*?)</div>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
for scrapedplot in matches:
|
|
||||||
splot = title + "\n\n"
|
|
||||||
plot = scrapedplot
|
|
||||||
plot = re.sub('<h2>', "[COLOR red][B]", plot)
|
|
||||||
plot = re.sub('</h2>', "[/B][/COLOR] : ", plot)
|
|
||||||
plot = re.sub('<p>', "[COLOR green]", plot)
|
|
||||||
plot = re.sub('</p>', "[/COLOR]\n", plot)
|
|
||||||
plot = re.sub('<[^>]+>', "", plot)
|
|
||||||
splot += plot + "\n[COLOR red][B] Sinopsis[/B][/COLOR]\n " + sinopsis
|
|
||||||
|
|
||||||
# datos de los enlaces
|
|
||||||
'''
|
|
||||||
<a rel="nofollow" href="(.*?)".*?<td><img.*?</td><td>(.*?)</td><td>(.*?)</td></tr>
|
|
||||||
|
|
||||||
">Vimple</td>
|
|
||||||
'''
|
|
||||||
|
|
||||||
patron = '<tbody>(.*?)</tbody>'
|
patron = '<tbody>(.*?)</tbody>'
|
||||||
matchesx = re.compile(patron, re.DOTALL).findall(data)
|
matchesx = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for bloq in matchesx:
|
for bloq in matchesx:
|
||||||
patron = 'href="(.*?)".*?0 0">(.*?)</.*?<td>(.*?)</.*?<td>(.*?)<'
|
patron = 'href="(.*?)".*?0 0">(.*?)</.*?<td>(.*?)</.*?<td>(.*?)<'
|
||||||
|
matches = scrapertools.find_multiple_matches(bloq, patron)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(bloq)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedserver, scrapedlang, scrapedquality in matches:
|
for scrapedurl, scrapedserver, scrapedlang, scrapedquality in matches:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = scrapedurl
|
||||||
logger.info("Lang:[" + scrapedlang + "] Quality[" + scrapedquality + "] URL[" + url + "]")
|
|
||||||
patronenlaces = '.*?://(.*?)/'
|
patronenlaces = '.*?://(.*?)/'
|
||||||
matchesenlaces = re.compile(patronenlaces, re.DOTALL).findall(scrapedurl)
|
matchesenlaces = scrapertools.find_multiple_matches(scrapedurl, patronenlaces)
|
||||||
scrapedtitle = ""
|
scrapedtitle = ""
|
||||||
if scrapedserver == 'Vimple':
|
if scrapedserver == 'Vimple':
|
||||||
scrapedserver = 'vimpleru'
|
scrapedserver = 'vimpleru'
|
||||||
@@ -254,11 +210,12 @@ def findvideos(item):
|
|||||||
scrapedserver = 'okru'
|
scrapedserver = 'okru'
|
||||||
server = servertools.get_server_name(scrapedserver)
|
server = servertools.get_server_name(scrapedserver)
|
||||||
for scrapedenlace in matchesenlaces:
|
for scrapedenlace in matchesenlaces:
|
||||||
scrapedtitle = title + " [COLOR white][ [/COLOR]" + "[COLOR green]" + scrapedquality + "[/COLOR]" + "[COLOR white] ][/COLOR]" + " [COLOR red] [" + scrapedlang + "][/COLOR] » " + scrapedserver
|
scrapedtitle = "[COLOR white][ [/COLOR][COLOR green]" + scrapedquality + "[/COLOR]" + "[COLOR white] ][/COLOR] [COLOR red] [" + scrapedlang + "][/COLOR] » " + scrapedserver
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url,
|
itemlist.append(item.clone(action="play", title=scrapedtitle, extra=title, url=url,
|
||||||
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
|
fanart=item.thumbnail, language=scrapedlang,
|
||||||
quality=scrapedquality, server=server))
|
quality=scrapedquality, server = server))
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
if itemlist:
|
if itemlist:
|
||||||
itemlist.append(Item(channel=item.channel))
|
itemlist.append(Item(channel=item.channel))
|
||||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer",
|
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer",
|
||||||
@@ -270,18 +227,15 @@ def findvideos(item):
|
|||||||
fulltitle=item.fulltitle))
|
fulltitle=item.fulltitle))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
def play(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
enc = scrapertools.find_multiple_matches(data, "Player\.decode\('(.*?)'\)")
|
enc = scrapertools.find_multiple_matches(data, "Player\.decode\('(.*?)'\)")
|
||||||
dec=''
|
dec=''
|
||||||
for cod in enc:
|
for cod in enc:
|
||||||
dec+=decode(cod)
|
dec+=decode(cod)
|
||||||
url = scrapertools.find_single_match(dec,'src="(.*?)"')
|
url = scrapertools.find_single_match(dec, 'src="(.*?)"')
|
||||||
itemlist.append(item.clone(url=url))
|
itemlist.append(item.clone(url=url))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -290,7 +244,7 @@ def play(item):
|
|||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info(item.url)
|
logger.info(item.url)
|
||||||
texto = texto.replace(" ", "+")
|
texto = texto.replace(" ", "+")
|
||||||
item.url = 'http://www.repelis.tv/buscar/?s=%s' % (texto)
|
item.url = host + '/buscar/?s=%s' % (texto)
|
||||||
logger.info(item.url)
|
logger.info(item.url)
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||||
@@ -311,8 +265,8 @@ def search(item, texto):
|
|||||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "")
|
title = title.replace("Online", "")
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = item.url + scrapedurl
|
||||||
thumbnail = urlparse.urljoin(item.url, scrapedthumbnail)
|
thumbnail = item.url + scrapedthumbnail
|
||||||
logger.info(url)
|
logger.info(url)
|
||||||
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
itemlist.append(Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url,
|
||||||
thumbnail=thumbnail, fanart=thumbnail))
|
thumbnail=thumbnail, fanart=thumbnail))
|
||||||
@@ -332,7 +286,7 @@ def poranyo(item):
|
|||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "")
|
title = title.replace("Online", "")
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = item.url + scrapedurl
|
||||||
itemlist.append(Item(channel=item.channel, action="menupelis", title=title, fulltitle=title, url=url,
|
itemlist.append(Item(channel=item.channel, action="menupelis", title=title, fulltitle=title, url=url,
|
||||||
fanart=item.fanart, extra='year'))
|
fanart=item.fanart, extra='year'))
|
||||||
|
|
||||||
@@ -345,13 +299,12 @@ def porcateg(item):
|
|||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
data = httptools.downloadpage(item.url).data.decode('iso-8859-1').encode('utf-8')
|
||||||
patron = '<li class="cat-item cat-item-3">.*?<a href="([^"]+)" title="([^"]+)">'
|
patron = '<li class="cat-item cat-item-3">.*?<a href="([^"]+)" title="([^"]+)">'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
title = scrapertools.remove_show_from_title(scrapedtitle, "Ver Película")
|
||||||
title = title.replace("Online", "")
|
title = title.replace("Online", "")
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = scrapedurl
|
||||||
logger.info(url)
|
logger.info(url)
|
||||||
# si no esta permitidas categoria adultos, la filtramos
|
# si no esta permitidas categoria adultos, la filtramos
|
||||||
extra = title
|
extra = title
|
||||||
|
|||||||
@@ -119,14 +119,15 @@ def episodios(item):
|
|||||||
scrapertools.printMatches(matches)
|
scrapertools.printMatches(matches)
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle, bloqueidiomas in matches:
|
for scrapedurl, scrapedtitle, bloqueidiomas in matches:
|
||||||
title = scrapedtitle.strip() + " (" + extrae_idiomas(bloqueidiomas) + ")"
|
idiomas, language = extrae_idiomas(bloqueidiomas)
|
||||||
|
title = scrapedtitle.strip() + " (" + idiomas + ")"
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
thumbnail = ""
|
thumbnail = ""
|
||||||
plot = ""
|
plot = ""
|
||||||
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
Item(channel=item.channel, action="findvideos", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
||||||
plot=plot, show=item.show, folder=True))
|
plot=plot, show=item.show, folder=True, language=language))
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
itemlist.append(Item(channel=item.channel, title="Añadir esta serie a la videoteca", url=item.url,
|
||||||
@@ -142,18 +143,19 @@ def extrae_idiomas(bloqueidiomas):
|
|||||||
patronidiomas = '([a-z0-9]+).png"'
|
patronidiomas = '([a-z0-9]+).png"'
|
||||||
idiomas = re.compile(patronidiomas, re.DOTALL).findall(bloqueidiomas)
|
idiomas = re.compile(patronidiomas, re.DOTALL).findall(bloqueidiomas)
|
||||||
textoidiomas = ""
|
textoidiomas = ""
|
||||||
|
language=[]
|
||||||
for idioma in idiomas:
|
for idioma in idiomas:
|
||||||
if idioma == "1":
|
if idioma == "1":
|
||||||
textoidiomas = textoidiomas + "Español" + "/"
|
textoidiomas = textoidiomas + "Español" + "/"
|
||||||
if idioma == "2":
|
if idioma == "2":
|
||||||
textoidiomas = textoidiomas + "Latino" + "/"
|
textoidiomas = textoidiomas + "Latino" + "/"
|
||||||
if idioma == "3":
|
if idioma == "3":
|
||||||
textoidiomas = textoidiomas + "VOS" + "/"
|
textoidiomas = textoidiomas + "VOSE" + "/"
|
||||||
if idioma == "4":
|
if idioma == "4":
|
||||||
textoidiomas = textoidiomas + "VO" + "/"
|
textoidiomas = textoidiomas + "VO" + "/"
|
||||||
|
language.append(codigo_a_idioma(idioma))
|
||||||
textoidiomas = textoidiomas[:-1]
|
textoidiomas = textoidiomas[:-1]
|
||||||
return textoidiomas
|
return textoidiomas, language
|
||||||
|
|
||||||
|
|
||||||
def codigo_a_idioma(codigo):
|
def codigo_a_idioma(codigo):
|
||||||
@@ -163,7 +165,7 @@ def codigo_a_idioma(codigo):
|
|||||||
if codigo == "2":
|
if codigo == "2":
|
||||||
idioma = "Latino"
|
idioma = "Latino"
|
||||||
if codigo == "3":
|
if codigo == "3":
|
||||||
idioma = "VOS"
|
idioma = "VOSE"
|
||||||
if codigo == "4":
|
if codigo == "4":
|
||||||
idioma = "VO"
|
idioma = "VO"
|
||||||
|
|
||||||
@@ -195,14 +197,15 @@ def findvideos(item):
|
|||||||
|
|
||||||
for idioma, servername, scrapedurl in matches:
|
for idioma, servername, scrapedurl in matches:
|
||||||
title = "Mirror en " + servername + " (" + codigo_a_idioma(idioma) + ")"
|
title = "Mirror en " + servername + " (" + codigo_a_idioma(idioma) + ")"
|
||||||
|
language = codigo_a_idioma(idioma)
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
thumbnail = ""
|
thumbnail = ""
|
||||||
plot = ""
|
plot = ""
|
||||||
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
Item(channel=item.channel, action="play", title=title, fulltitle=title, url=url, thumbnail=thumbnail,
|
||||||
plot=plot, folder=False))
|
plot=plot, folder=False, language=language))
|
||||||
|
itemlist = servertools.get_servers_itemlist(itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ def lista(item):
|
|||||||
actual_page_url = item.url
|
actual_page_url = item.url
|
||||||
next_page = scrapertools.find_single_match(data, '<div class=pag_b><a href=(.*?) >Siguiente<\/a><\/div>')
|
next_page = scrapertools.find_single_match(data, '<div class=pag_b><a href=(.*?) >Siguiente<\/a><\/div>')
|
||||||
if next_page != '':
|
if next_page != '':
|
||||||
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=item.url + next_page,
|
itemlist.append(Item(channel=item.channel, action="lista", title='Siguiente >>>', url=host + next_page,
|
||||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'))
|
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ def lista_gen(item):
|
|||||||
context1=[renumbertools.context(item), autoplay.context]
|
context1=[renumbertools.context(item), autoplay.context]
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios",
|
Item(channel=item.channel, title=title, url=scrapedurl, thumbnail=scrapedthumbnail, action="episodios",
|
||||||
show=scrapedtitle, context=context1))
|
show=scrapedtitle, context=context1, language=scrapedlang))
|
||||||
tmdb.set_infoLabels(itemlist)
|
tmdb.set_infoLabels(itemlist)
|
||||||
# Paginacion
|
# Paginacion
|
||||||
|
|
||||||
|
|||||||
@@ -171,12 +171,13 @@ def findvideos(item):
|
|||||||
|
|
||||||
matches = re.compile(pattern, re.S).findall(data)
|
matches = re.compile(pattern, re.S).findall(data)
|
||||||
|
|
||||||
for url, server, lang in matches:
|
for url, server, language in matches:
|
||||||
title = "[%s] - [%s]" % (lang, server)
|
title = "[%s] - [%s]" % (language, server)
|
||||||
url = host + url
|
url = host + url
|
||||||
|
server = re.sub('(\..*)', '', server)
|
||||||
logger.debug("url %s" % url)
|
logger.debug("url %s" % url)
|
||||||
itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url,
|
itemlist.append(Item(channel=item.channel, action="play", title=title, fulltitle=item.fulltitle, url=url,
|
||||||
thumbnail=item.thumbnail, lang=lang))
|
thumbnail=item.thumbnail, language=language, server=server))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -191,5 +192,6 @@ def play(item):
|
|||||||
for video_item in itemlist:
|
for video_item in itemlist:
|
||||||
video_item.title = "%s [%s]" % (item.fulltitle, item.lang)
|
video_item.title = "%s [%s]" % (item.fulltitle, item.lang)
|
||||||
video_item.thumbnail = item.thumbnail
|
video_item.thumbnail = item.thumbnail
|
||||||
|
video_item.language = item.language
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"id": "tiotorrent",
|
||||||
|
"name": "TioTorrent",
|
||||||
|
"active": true,
|
||||||
|
"adult": false,
|
||||||
|
"language": ["cast","lat"],
|
||||||
|
"thumbnail": "https://s1.postimg.org/29eths1fi7/tiotorrent.png",
|
||||||
|
"banner": "https://s1.postimg.org/9gkc73lxb3/tiotorrent-banner.png",
|
||||||
|
"version": 1,
|
||||||
|
"categories": [
|
||||||
|
"movie",
|
||||||
|
"tvshow",
|
||||||
|
"torrent"
|
||||||
|
],
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "include_in_newest_peliculas",
|
||||||
|
"type": "bool",
|
||||||
|
"label": "Incluir en Novedades - Peliculas",
|
||||||
|
"default": true,
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# -*- Channel TioTorrent -*-
|
||||||
|
# -*- Created for Alfa-addon -*-
|
||||||
|
# -*- By the Alfa Develop Group -*-
|
||||||
|
|
||||||
|
import re
|
||||||
|
from channelselector import get_thumb
|
||||||
|
from platformcode import logger
|
||||||
|
from platformcode import config
|
||||||
|
from core import scrapertools
|
||||||
|
from core.item import Item
|
||||||
|
from core import servertools
|
||||||
|
from core import httptools
|
||||||
|
from core import tmdb
|
||||||
|
|
||||||
|
host = 'http://www.tiotorrent.com/'
|
||||||
|
|
||||||
|
def mainlist(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Peliculas",
|
||||||
|
action="movie_list",
|
||||||
|
thumbnail=get_thumb("channels_movie.png")
|
||||||
|
))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Series",
|
||||||
|
action="series_list",
|
||||||
|
thumbnail=get_thumb("channels_tvshow.png")
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def movie_list(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Estrenos",
|
||||||
|
action="lista",
|
||||||
|
url=host + 'estrenos-de-cine',
|
||||||
|
extra='movie'
|
||||||
|
))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Todas",
|
||||||
|
action="lista",
|
||||||
|
url=host + 'peliculas',
|
||||||
|
extra='movie'
|
||||||
|
))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Buscar",
|
||||||
|
action="search",
|
||||||
|
url=host + '/peliculas/?pTit=',
|
||||||
|
thumbnail=get_thumb("search.png"),
|
||||||
|
extra='movie'
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def series_list(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Todas",
|
||||||
|
action="lista",
|
||||||
|
url=host + 'series',
|
||||||
|
extra='serie'
|
||||||
|
))
|
||||||
|
|
||||||
|
itemlist.append(item.clone(title="Buscar",
|
||||||
|
action="search",
|
||||||
|
url=host + '/series/?pTit=',
|
||||||
|
thumbnail=get_thumb("search.png"),
|
||||||
|
extra='serie'
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def get_source(url):
|
||||||
|
logger.info()
|
||||||
|
data = httptools.downloadpage(url).data
|
||||||
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
|
return data
|
||||||
|
|
||||||
|
def lista (item):
|
||||||
|
logger.info ()
|
||||||
|
itemlist = []
|
||||||
|
data = get_source(item.url)
|
||||||
|
if item.extra == 'movie':
|
||||||
|
patron = "<div class=moviesbox.*?><a href=(.*?)>.*?image:url\('(.*?)'\)>.*?<b>.*?>(.*?)<"
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||||
|
url = scrapedurl
|
||||||
|
thumbnail = scrapedthumbnail
|
||||||
|
contentTitle = scrapedtitle.decode('latin1').encode('utf8')
|
||||||
|
title = contentTitle
|
||||||
|
filtro_thumb = scrapedthumbnail.replace("https://image.tmdb.org/t/p/w396", "")
|
||||||
|
filtro_list = {"poster_path": filtro_thumb}
|
||||||
|
filtro_list = filtro_list.items()
|
||||||
|
|
||||||
|
itemlist.append(item.clone(action='findvideos',
|
||||||
|
title=title, url=url,
|
||||||
|
thumbnail=thumbnail,
|
||||||
|
contentTitle=contentTitle,
|
||||||
|
infoLabels={'filtro': filtro_list},
|
||||||
|
extra=item.extra
|
||||||
|
))
|
||||||
|
else:
|
||||||
|
patron = "<div class=moviesbox.*?>.*?episode>(.*?)x(.*?)<.*?href=(.*?)>.*?image:url\('(.*?)'.*?href.*?>(.*?)<"
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
for season, episode, scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||||
|
url = scrapedurl
|
||||||
|
thumbnail = scrapedthumbnail
|
||||||
|
contentSerieName = scrapedtitle
|
||||||
|
title = '%s' % contentSerieName
|
||||||
|
filtro_thumb = scrapedthumbnail.replace("https://image.tmdb.org/t/p/w396", "")
|
||||||
|
filtro_list = {"poster_path": filtro_thumb}
|
||||||
|
filtro_list = filtro_list.items()
|
||||||
|
contentSeason=season
|
||||||
|
contentEpisode=episode
|
||||||
|
itemlist.append(item.clone(action='seasons',
|
||||||
|
title=title,
|
||||||
|
url=url,
|
||||||
|
thumbnail=thumbnail,
|
||||||
|
contentSerieName=contentSerieName,
|
||||||
|
contentSeason=contentSeason,
|
||||||
|
contentEpisode=contentEpisode,
|
||||||
|
infoLabels={'filtro': filtro_list},
|
||||||
|
extra=item.extra
|
||||||
|
))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb =True)
|
||||||
|
#Paginacion
|
||||||
|
|
||||||
|
if itemlist !=[]:
|
||||||
|
actual_page_url = item.url
|
||||||
|
next_page = scrapertools.find_single_match(data,'<span class=pagination_next><a href=(.*?)>')
|
||||||
|
import inspect
|
||||||
|
if next_page !='':
|
||||||
|
itemlist.append(item.clone(action = "lista",
|
||||||
|
title = 'Siguiente >>>',
|
||||||
|
url = next_page,
|
||||||
|
thumbnail='https://s32.postimg.org/4zppxf5j9/siguiente.png'
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def search(item, texto):
|
||||||
|
logger.info()
|
||||||
|
texto = texto.replace(" ", "+")
|
||||||
|
item.url = item.url + texto
|
||||||
|
|
||||||
|
if texto != '':
|
||||||
|
return lista(item)
|
||||||
|
else:
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def seasons(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist=[]
|
||||||
|
infoLabels = item.infoLabels
|
||||||
|
data=get_source(item.url)
|
||||||
|
patron ='href=javascript:showSeasson\(.*?\); id=.*?>Temporada (.*?)<\/a>'
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
for season in matches:
|
||||||
|
title='Temporada %s' % season
|
||||||
|
infoLabels['season'] = season
|
||||||
|
itemlist.append(Item(channel=item.channel,
|
||||||
|
title= title,
|
||||||
|
url=item.url,
|
||||||
|
action='episodesxseasons',
|
||||||
|
contentSeasonNumber=season,
|
||||||
|
contentSerieName=item.contentSerieName,
|
||||||
|
infoLabels=infoLabels
|
||||||
|
))
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
itemlist = itemlist[::-1]
|
||||||
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel, title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]', url=item.url,
|
||||||
|
action="add_serie_to_library", extra="all_episodes", contentSerieName=item.contentSerieName))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def all_episodes(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist = []
|
||||||
|
templist = seasons(item)
|
||||||
|
for tempitem in templist:
|
||||||
|
itemlist += episodesxseasons(tempitem)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def episodesxseasons(item):
|
||||||
|
logger.info()
|
||||||
|
|
||||||
|
itemlist=[]
|
||||||
|
|
||||||
|
data=get_source(item.url)
|
||||||
|
patron = "<div class=corner-episode>%sx(.\d+)<\/div><a href=(.*?)>.*?" % item.contentSeasonNumber
|
||||||
|
patron += "image:url\('(.*?)'.*?href.*?>(%s)<" % item.contentSerieName
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
infoLabels=item.infoLabels
|
||||||
|
for episode, scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||||
|
contentEpisodeNumber=episode
|
||||||
|
season = item.contentSeasonNumber
|
||||||
|
url=scrapedurl
|
||||||
|
thumbnail=scrapedthumbnail
|
||||||
|
infoLabels['episode']=episode
|
||||||
|
title = '%sx%s - %s' % (season, episode, item.contentSerieName)
|
||||||
|
itemlist.append(Item(channel=item.channel,
|
||||||
|
action='findvideos',
|
||||||
|
title=title,
|
||||||
|
url=url,
|
||||||
|
thumbnail=thumbnail,
|
||||||
|
contentSerieName=item.contentSerieName,
|
||||||
|
contentEpisodeNumber=contentEpisodeNumber,
|
||||||
|
infoLabels=infoLabels
|
||||||
|
))
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
|
return itemlist[::-1]
|
||||||
|
|
||||||
|
|
||||||
|
def findvideos(item):
|
||||||
|
logger.info()
|
||||||
|
itemlist=[]
|
||||||
|
data = get_source(item.url)
|
||||||
|
patron = "<a class=dload.*? target=_blank>.*?<\/a><i>(.*?)<\/i>.*?<a href=.*?showDownload\((.*?)\);"
|
||||||
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
for quality, extra_info in matches:
|
||||||
|
extra_info= extra_info.replace("'",'')
|
||||||
|
extra_info= extra_info.split(',')
|
||||||
|
title = '%s [%s]' % (item.contentTitle, quality)
|
||||||
|
url = extra_info[1]
|
||||||
|
if item.extra == 'movie':
|
||||||
|
url = extra_info[1]
|
||||||
|
else:
|
||||||
|
url = extra_info[2]
|
||||||
|
server = 'torrent'
|
||||||
|
itemlist.append(Item(channel=item.channel,
|
||||||
|
title=title,
|
||||||
|
contentTitle= item.title,
|
||||||
|
url=url,
|
||||||
|
action='play',
|
||||||
|
quality=quality,
|
||||||
|
server=server,
|
||||||
|
thumbnail = item.infoLabels['thumbnail'],
|
||||||
|
infoLabels=item.infoLabels
|
||||||
|
))
|
||||||
|
|
||||||
|
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||||
|
itemlist.append(Item(channel=item.channel,
|
||||||
|
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||||
|
url=item.url,
|
||||||
|
action="add_pelicula_to_library",
|
||||||
|
extra="findvideos",
|
||||||
|
contentTitle=item.contentTitle
|
||||||
|
))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def newest(category):
|
||||||
|
logger.info()
|
||||||
|
item = Item()
|
||||||
|
try:
|
||||||
|
if category == 'peliculas':
|
||||||
|
item.url = host + 'estrenos-de-cine'
|
||||||
|
item.extra='movie'
|
||||||
|
itemlist = lista(item)
|
||||||
|
if itemlist[-1].title == 'Siguiente >>>':
|
||||||
|
itemlist.pop()
|
||||||
|
except:
|
||||||
|
import sys
|
||||||
|
for line in sys.exc_info():
|
||||||
|
logger.error("%s" % line)
|
||||||
|
return []
|
||||||
|
|
||||||
|
return itemlist
|
||||||
@@ -13,7 +13,7 @@ from platformcode import config, logger
|
|||||||
|
|
||||||
host = 'http://verpeliculasnuevas.com'
|
host = 'http://verpeliculasnuevas.com'
|
||||||
|
|
||||||
IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOS'}
|
IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOSE'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
|
|
||||||
taudio = {'latino': '[COLOR limegreen]LATINO[/COLOR]',
|
taudio = {'latino': '[COLOR limegreen]LATINO[/COLOR]',
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# -*- Channel TioTorrent -*-
|
||||||
|
# -*- Created for Alfa-addon -*-
|
||||||
|
# -*- By the Alfa Develop Group -*-
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ def filterchannels(category, view="thumb_"):
|
|||||||
|
|
||||||
def get_thumb(thumb_name, view="thumb_"):
|
def get_thumb(thumb_name, view="thumb_"):
|
||||||
|
|
||||||
icon_pack_name = config.get_setting('icon_set')
|
icon_pack_name = config.get_setting('icon_set', default="default")
|
||||||
if icon_pack_name == "default":
|
if icon_pack_name == "default":
|
||||||
resource_path = os.path.join(config.get_runtime_path(), "resources", "media", "themes")
|
resource_path = os.path.join(config.get_runtime_path(), "resources", "media", "themes")
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -223,7 +223,6 @@ def save_tvshow(item, episodelist):
|
|||||||
return 0, 0, -1 # Salimos sin guardar
|
return 0, 0, -1 # Salimos sin guardar
|
||||||
|
|
||||||
scraper_return = scraper.find_and_set_infoLabels(item)
|
scraper_return = scraper.find_and_set_infoLabels(item)
|
||||||
|
|
||||||
# Llegados a este punto podemos tener:
|
# Llegados a este punto podemos tener:
|
||||||
# scraper_return = True: Un item con infoLabels con la información actualizada de la serie
|
# scraper_return = True: Un item con infoLabels con la información actualizada de la serie
|
||||||
# scraper_return = False: Un item sin información de la peli (se ha dado a cancelar en la ventana)
|
# scraper_return = False: Un item sin información de la peli (se ha dado a cancelar en la ventana)
|
||||||
@@ -238,6 +237,8 @@ def save_tvshow(item, episodelist):
|
|||||||
|
|
||||||
if config.get_setting("original_title_folder", "videolibrary") == 1 and item.infoLabels['originaltitle']:
|
if config.get_setting("original_title_folder", "videolibrary") == 1 and item.infoLabels['originaltitle']:
|
||||||
base_name = item.infoLabels['originaltitle']
|
base_name = item.infoLabels['originaltitle']
|
||||||
|
elif item.infoLabels['tvshowtitle']:
|
||||||
|
base_name = item.infoLabels['tvshowtitle']
|
||||||
elif item.infoLabels['title']:
|
elif item.infoLabels['title']:
|
||||||
base_name = item.infoLabels['title']
|
base_name = item.infoLabels['title']
|
||||||
else:
|
else:
|
||||||
@@ -566,7 +567,6 @@ def add_tvshow(item, channel=None):
|
|||||||
|
|
||||||
# Obtiene el listado de episodios
|
# Obtiene el listado de episodios
|
||||||
itemlist = getattr(channel, item.action)(item)
|
itemlist = getattr(channel, item.action)(item)
|
||||||
|
|
||||||
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
|
insertados, sobreescritos, fallidos, path = save_tvshow(item, itemlist)
|
||||||
|
|
||||||
if not insertados and not sobreescritos and not fallidos:
|
if not insertados and not sobreescritos and not fallidos:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from threading import Timer
|
|||||||
import xbmc
|
import xbmc
|
||||||
import xbmcaddon
|
import xbmcaddon
|
||||||
import xbmcgui
|
import xbmcgui
|
||||||
from core import filetools
|
from channelselector import get_thumb
|
||||||
from platformcode import config
|
from platformcode import config
|
||||||
|
|
||||||
|
|
||||||
@@ -82,27 +82,13 @@ def set_key():
|
|||||||
|
|
||||||
|
|
||||||
MAIN_MENU = {
|
MAIN_MENU = {
|
||||||
"news": {"label": "Novedades",
|
"news": {"label": "Novedades", "icon": get_thumb("news.png"), "order": 0},
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
"channels": {"label": "Canales", "icon": get_thumb("channels.png"), "order": 1},
|
||||||
"thumb_news.png"), "order": 0},
|
"search": {"label": "Buscador", "icon": get_thumb("search.png"), "order": 2},
|
||||||
"channels": {"label": "Canales",
|
"favorites": {"label": "Favoritos", "icon": get_thumb("favorites.png"), "order": 3},
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
"videolibrary": {"label": "Videoteca", "icon": get_thumb("videolibrary.png"), "order": 4},
|
||||||
"thumb_channels.png"), "order": 1},
|
"downloads": {"label": "Descargas", "icon": get_thumb("downloads.png"), "order": 5},
|
||||||
"search": {"label": "Buscador",
|
"settings": {"label": "Configuración", "icon": get_thumb("setting_0.png"), "order": 6}
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
|
||||||
"thumb_search.png"), "order": 2},
|
|
||||||
"favorites": {"label": "Favoritos",
|
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
|
||||||
"thumb_favorites.png"), "order": 3},
|
|
||||||
"videolibrary": {"label": "Videoteca",
|
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
|
||||||
"thumb_videolibrary.png"), "order": 4},
|
|
||||||
"downloads": {"label": "Descargas",
|
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
|
||||||
"thumb_downloads.png"), "order": 5},
|
|
||||||
"settings": {"label": "Configuración",
|
|
||||||
"icon": filetools.join(config.get_runtime_path(), "resources", "media", "general", "default",
|
|
||||||
"thumb_setting_0.png"), "order": 6},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<setting id="videolibrary_kodi" type="bool" label="Autoconfigurar videoteca de XBMC/Kodi para contenido de Alfa" enable="lt(-1,2)+eq(0,false)" default="false"/>
|
<setting id="videolibrary_kodi" type="bool" label="Autoconfigurar videoteca de XBMC/Kodi para contenido de Alfa" enable="lt(-1,2)+eq(0,false)" default="false"/>
|
||||||
</category>
|
</category>
|
||||||
<category label="Opciones Visuales">
|
<category label="Opciones Visuales">
|
||||||
<setting id="icon_set" type="labelenum" label="Set de iconos" lvalues="default|dark" default="default"/>
|
<setting id="icon_set" type="labelenum" label="Set de iconos" values="default|dark" default="default"/>
|
||||||
</category>
|
</category>
|
||||||
<category label="Otros">
|
<category label="Otros">
|
||||||
<setting label="Info de películas/series en menú contextual" type="lsep"/>
|
<setting label="Info de películas/series en menú contextual" type="lsep"/>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "https://www.bitporno.com/e/([A-z0-9]+)",
|
"pattern": "https://www.bitporno.com/(?:e|embed)/([A-z0-9]+)",
|
||||||
"url": "https://www.bitporno.com/e/\\1"
|
"url": "https://www.bitporno.com/e/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"date": "09/10/2017",
|
||||||
|
"description": "Versión inicial"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "cloudsany.com/i/([A-z0-9]+)",
|
||||||
|
"url": "https://cloudsany.com/i/\\1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "cloudsany",
|
||||||
|
"name": "cloudsany",
|
||||||
|
"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://s1.postimg.org/6wixo35myn/cloudsany1.png",
|
||||||
|
"version": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Alfa addon - KODI Plugin
|
||||||
|
# Conector para cloudsany
|
||||||
|
# https://github.com/alfa-addon
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
from core import httptools
|
||||||
|
from core import scrapertools
|
||||||
|
from lib import jsunpack
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
if "no longer exists" in data:
|
||||||
|
return False, "[Cloudsany] El fichero ha sido borrado"
|
||||||
|
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, user="", password="", video_password=""):
|
||||||
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
data = scrapertools.find_single_match(data, 'p,a,c,k,e.*?</script>')
|
||||||
|
unpack = jsunpack.unpack(data)
|
||||||
|
logger.info("Intel11 %s" %unpack)
|
||||||
|
video_urls = []
|
||||||
|
videourl = scrapertools.find_single_match(unpack, 'config={file:"([^"]+)')
|
||||||
|
video_urls.append([".MP4 [Cloudsany]", videourl])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
@@ -48,5 +48,6 @@
|
|||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"thumbnail": "https://s1.postimg.org/9e6doboo2n/cloudy1.png",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
headers['Accept'] = "*/*"
|
headers['Accept'] = "*/*"
|
||||||
headers['Host'] = "www.flashx.tv"
|
headers['Host'] = "www.flashx.tv"
|
||||||
|
|
||||||
coding_url = 'https://www.flashx.tv/flashx.php?fxfx=7'
|
coding_url = 'https://www.flashx.tv/flashx.php?f=x&fxfx=6'
|
||||||
headers['X-Requested-With'] = 'XMLHttpRequest'
|
headers['X-Requested-With'] = 'XMLHttpRequest'
|
||||||
httptools.downloadpage(coding_url, headers=headers)
|
httptools.downloadpage(coding_url, headers=headers)
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ from core import scrapertools
|
|||||||
from lib import jsunpack
|
from lib import jsunpack
|
||||||
from platformcode import logger
|
from platformcode import logger
|
||||||
|
|
||||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0'}
|
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0'}
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
data = httptools.downloadpage(page_url, headers=headers).data
|
data = httptools.downloadpage(page_url, add_referer = True).data
|
||||||
|
|
||||||
if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data:
|
if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data:
|
||||||
return False, "[Gamovideo] El archivo no existe o ha sido borrado"
|
return False, "[Gamovideo] El archivo no existe o ha sido borrado"
|
||||||
@@ -24,7 +24,7 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
data = httptools.downloadpage(page_url, headers=headers).data
|
data = httptools.downloadpage(page_url, add_referer = True, headers=headers).data
|
||||||
|
|
||||||
packer = scrapertools.find_single_match(data,
|
packer = scrapertools.find_single_match(data,
|
||||||
"<script type='text/javascript'>(eval.function.p,a,c,k,e,d..*?)</script>")
|
"<script type='text/javascript'>(eval.function.p,a,c,k,e,d..*?)</script>")
|
||||||
@@ -32,7 +32,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
data = jsunpack.unpack(packer)
|
data = jsunpack.unpack(packer)
|
||||||
|
|
||||||
data = re.sub(r'\n|\t|\s+', '', data)
|
data = re.sub(r'\n|\t|\s+', '', data)
|
||||||
|
|
||||||
host = scrapertools.find_single_match(data, '\[\{image:"(http://[^/]+/)')
|
host = scrapertools.find_single_match(data, '\[\{image:"(http://[^/]+/)')
|
||||||
mediaurl = scrapertools.find_single_match(data, ',\{file:"([^"]+)"')
|
mediaurl = scrapertools.find_single_match(data, ',\{file:"([^"]+)"')
|
||||||
if not mediaurl.startswith(host):
|
if not mediaurl.startswith(host):
|
||||||
|
|||||||
Executable → Regular
+3
-9
@@ -1,23 +1,17 @@
|
|||||||
{
|
{
|
||||||
"active": true,
|
"active": true,
|
||||||
"changes": [
|
|
||||||
{
|
|
||||||
"date": "16/02/2017",
|
|
||||||
"description": "Primera versión"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "((?:copiapop.com|diskokosmiko.mx)/[^\\s'\"]+)",
|
"pattern": "((?:kbagi.com|diskokosmiko.mx)/[^\\s'\"]+)",
|
||||||
"url": "http://\\1"
|
"url": "http://\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
"id": "copiapop",
|
"id": "kbagi",
|
||||||
"name": "copiapop",
|
"name": "kbagi",
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
"default": false,
|
"default": false,
|
||||||
Executable → Regular
+6
-6
@@ -8,15 +8,15 @@ from platformcode import logger
|
|||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
if "copiapop.com" in page_url:
|
if "kbagi.com" in page_url:
|
||||||
from channels import copiapop
|
from channels import kbagi
|
||||||
logueado, error_message = copiapop.login("copiapop.com")
|
logueado, error_message = kbagi.login("kbagi.com")
|
||||||
if not logueado:
|
if not logueado:
|
||||||
return False, error_message
|
return False, error_message
|
||||||
|
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
if ("File was deleted" or "Not Found" or "File was locked by administrator") in data:
|
if ("File was deleted" or "Not Found" or "File was locked by administrator") in data:
|
||||||
return False, "[Copiapop] El archivo no existe o ha sido borrado"
|
return False, "[kbagi] El archivo no existe o ha sido borrado"
|
||||||
|
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
|
|
||||||
video_urls = []
|
video_urls = []
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
host = "http://copiapop.com"
|
host = "http://kbagi.com"
|
||||||
host_string = "copiapop"
|
host_string = "kbagi"
|
||||||
if "diskokosmiko.mx" in page_url:
|
if "diskokosmiko.mx" in page_url:
|
||||||
host = "http://diskokosmiko.mx"
|
host = "http://diskokosmiko.mx"
|
||||||
host_string = "diskokosmiko"
|
host_string = "diskokosmiko"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "(rapidgator.net/file/.*?(?:\\.html))",
|
"pattern": "(rapidgator.net/file/\\w+(?:\\.html|))",
|
||||||
"url": "http://\\1"
|
"url": "http://\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -68,5 +68,6 @@
|
|||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"thumbnail": "https://s1.postimg.org/912d5vxmv3/streamplay1.png",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
@@ -20,10 +20,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
logger.info("url=" + page_url)
|
logger.info("url=" + page_url)
|
||||||
|
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
|
|
||||||
key = scrapertools.find_single_match(data, "var mpri_Key\s*=\s*'([^']+)'")
|
key = scrapertools.find_single_match(data, "var mpri_Key\s*=\s*'([^']+)'")
|
||||||
data_vt = httptools.downloadpage("http://vidup.me/jwv/%s" % key).data
|
data_vt = httptools.downloadpage("http://vidup.me/jwv/%s" % key).data
|
||||||
vt = scrapertools.find_single_match(data_vt, 'direct\|([^\|]+)\|')
|
vt = scrapertools.find_single_match(data_vt, 'file\|(.*?)\|direct')
|
||||||
|
|
||||||
# Extrae la URL
|
# Extrae la URL
|
||||||
video_urls = []
|
video_urls = []
|
||||||
|
|||||||
@@ -52,5 +52,6 @@
|
|||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"thumbnail": "https://s1.postimg.org/597or3a31b/vidzi1.png",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
@@ -58,5 +58,6 @@
|
|||||||
"visible": false
|
"visible": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"thumbnail" : "https://s1.postimg.org/4wje61el4f/yourupload1.png",
|
||||||
"version": 1
|
"version": 1
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user