Merge remote-tracking branch 'alfa-addon/master'
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.alfa" name="Alfa" version="2.1.0" provider-name="Alfa Addon">
|
<addon id="plugin.video.alfa" name="Alfa" version="2.1.1" provider-name="Alfa Addon">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.libtorrent" optional="true"/>
|
<import addon="script.module.libtorrent" optional="true"/>
|
||||||
@@ -19,11 +19,16 @@
|
|||||||
</assets>
|
</assets>
|
||||||
<news>[B]Estos son los cambios para esta versión:[/B]
|
<news>[B]Estos son los cambios para esta versión:[/B]
|
||||||
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
[COLOR green][B]Canales agregados y arreglos[/B][/COLOR]
|
||||||
» canalpelis » hdfull
|
» canalpelis » allcalidad
|
||||||
» xdvideos » playmax
|
» cinefox » cineasiaenlinea
|
||||||
» cinetux » gnula
|
» cinetux » divxatope
|
||||||
» flashx » rapidvideo
|
» maxipelis » pedropolis
|
||||||
|
» doomtv » animeshd
|
||||||
|
» hdfull » ultrapelishd
|
||||||
|
» pelisplus » cinecalidad
|
||||||
|
» peliculasnu » allpeliculas
|
||||||
¤ arreglos internos
|
¤ arreglos internos
|
||||||
|
[COLOR green]Gracias a [COLOR yellow]prpeaprendiz[/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>
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ def peliculas(item):
|
|||||||
thumbnail = thumbnail,
|
thumbnail = thumbnail,
|
||||||
url = url,
|
url = url,
|
||||||
contentTitle = titulo,
|
contentTitle = titulo,
|
||||||
contentType="movie"
|
contentType="movie",
|
||||||
|
language = idioma
|
||||||
)
|
)
|
||||||
if year:
|
if year:
|
||||||
new_item.infoLabels['year'] = int(year)
|
new_item.infoLabels['year'] = int(year)
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ import urllib
|
|||||||
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
|
from platformcode import logger, config
|
||||||
|
|
||||||
tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
tgenero = {"Comedia": "https://s7.postimg.org/ne9g9zgwb/comedia.png",
|
||||||
"Drama": "https://s16.postimg.org/94sia332d/drama.png",
|
"Drama": "https://s16.postimg.org/94sia332d/drama.png",
|
||||||
@@ -110,7 +111,7 @@ def lista(item):
|
|||||||
url=next_page_url,
|
url=next_page_url,
|
||||||
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'
|
thumbnail='https://s16.postimg.org/9okdu7hhx/siguiente.png'
|
||||||
))
|
))
|
||||||
|
tmdb.set_infoLabels(itemlist)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -157,29 +158,16 @@ def episodios(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = get_source(item.url)
|
data = get_source(item.url)
|
||||||
patron = '<li id=epi-.*? class=list-group-item ><a href=(.*?) class=badge.*?width=25 title=(.*?)> <\/span>(.*?)<\/li>'
|
patron = '<li id=epi-.*? class=list-group-item ><a href=(.*?) class=badge.*?width=25 title=(.*?)> <\/span>(.*?) (\d+)<\/li>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for scrapedurl, scrapedlang, scrapedtitle in matches:
|
for scrapedurl, scrapedlang, scrapedtitle, episode in matches:
|
||||||
language = scrapedlang
|
language = scrapedlang
|
||||||
title = scrapedtitle
|
title = scrapedtitle + " " + "1x" + episode
|
||||||
url = scrapedurl
|
url = scrapedurl
|
||||||
itemlist.append(item.clone(title=title, url=url, action='findvideos', language=language))
|
itemlist.append(item.clone(title=title, url=url, action='findvideos', language=language))
|
||||||
return itemlist
|
|
||||||
|
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", fanart=item.thumbnail, thumbnail=item.thumbnail, contentTitle=item.show, show=item.show))
|
||||||
def findvideos(item):
|
|
||||||
logger.info()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
data = get_source(item.url)
|
|
||||||
itemlist.extend(servertools.find_video_items(data=data))
|
|
||||||
|
|
||||||
for videoitem in itemlist:
|
|
||||||
title = item.title
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
videoitem.title = title
|
|
||||||
videoitem.action = 'play'
|
|
||||||
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -137,18 +137,18 @@ def peliculas(item):
|
|||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for scrapedthumbnail, scrapedtitle, rating, calidad, scrapedurl, year in matches[item.page:item.page + 20]:
|
for scrapedthumbnail, scrapedtitle, rating, quality, scrapedurl, year in matches[item.page:item.page + 20]:
|
||||||
if 'Próximamente' not in calidad and '-XXX.jpg' not in scrapedthumbnail:
|
if 'Próximamente' not in quality and '-XXX.jpg' not in scrapedthumbnail:
|
||||||
|
|
||||||
scrapedtitle = scrapedtitle.replace('Ver ', '').strip()
|
scrapedtitle = scrapedtitle.replace('Ver ', '').strip()
|
||||||
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, calidad)
|
scrapedtitle, year, quality)
|
||||||
|
|
||||||
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={'year': year, 'rating': rating},
|
||||||
contentTitle=contentTitle, thumbnail=scrapedthumbnail,
|
contentTitle=contentTitle, thumbnail=scrapedthumbnail,
|
||||||
title=title, context="buscar_trailer"))
|
title=title, context="buscar_trailer", quality = quality))
|
||||||
|
|
||||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||||
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
tmdb.set_infoLabels(itemlist, __modo_grafico__)
|
||||||
@@ -367,7 +367,7 @@ def findvideos(item):
|
|||||||
server = servertools.get_server_from_url(url)
|
server = servertools.get_server_from_url(url)
|
||||||
title = "%s [COLOR yellow](%s) (%s)[/COLOR]" % (item.contentTitle, server.title(), lang)
|
title = "%s [COLOR yellow](%s) (%s)[/COLOR]" % (item.contentTitle, server.title(), lang)
|
||||||
itemlist.append(item.clone(action='play', url=url, title=title, extra1=title,
|
itemlist.append(item.clone(action='play', url=url, title=title, extra1=title,
|
||||||
server=server, text_color=color3))
|
server=server, language = lang, text_color=color3))
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel=item.channel,
|
||||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||||
|
|||||||
@@ -108,9 +108,9 @@ def peliculas(item):
|
|||||||
infolab = {'year': year}
|
infolab = {'year': year}
|
||||||
itemlist.append(item.clone(action="findvideos", title=scrapedtitle, url=scrapedurl,
|
itemlist.append(item.clone(action="findvideos", title=scrapedtitle, url=scrapedurl,
|
||||||
thumbnail=scrapedthumbnail, infoLabels=infolab,
|
thumbnail=scrapedthumbnail, infoLabels=infolab,
|
||||||
contentTitle=title, contentType="movie"))
|
contentTitle=title, contentType="movie", quality=calidad))
|
||||||
|
|
||||||
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" href="([^"]+)"')
|
next_page = scrapertools.find_single_match(data, '<a class="nextpostslink" rel="next" href="([^"]+)"')
|
||||||
if next_page:
|
if next_page:
|
||||||
itemlist.append(item.clone(title=">> Página Siguiente", url=next_page))
|
itemlist.append(item.clone(title=">> Página Siguiente", url=next_page))
|
||||||
|
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ def findvideos(item):
|
|||||||
|
|
||||||
if server_id in server_url:
|
if server_id in server_url:
|
||||||
server = server_id.lower()
|
server = server_id.lower()
|
||||||
thumbnail = item.contentThumbnail
|
thumbnail = item.thumbnail
|
||||||
if server_id == 'TVM':
|
if server_id == 'TVM':
|
||||||
server = 'thevideo.me'
|
server = 'thevideo.me'
|
||||||
url = server_url[server_id] + video_id + '.html'
|
url = server_url[server_id] + video_id + '.html'
|
||||||
@@ -367,7 +367,7 @@ def play(item):
|
|||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.title = item.fulltitle
|
videoitem.title = item.fulltitle
|
||||||
videoitem.fulltitle = item.fulltitle
|
videoitem.fulltitle = item.fulltitle
|
||||||
videoitem.thumbnail = item.contentThumbnail
|
videoitem.thumbnail = item.thumbnail
|
||||||
videoitem.channel = item.channel
|
videoitem.channel = item.channel
|
||||||
else:
|
else:
|
||||||
itemlist.append(item)
|
itemlist.append(item)
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ def peliculas(item):
|
|||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action=action, title=title, url=url, extra="media",
|
itemlist.append(Item(channel=item.channel, action=action, title=title, url=url, extra="media",
|
||||||
thumbnail=scrapedthumbnail, contentTitle=scrapedtitle, fulltitle=scrapedtitle,
|
thumbnail=scrapedthumbnail, contentTitle=scrapedtitle, fulltitle=scrapedtitle,
|
||||||
text_color=color2, contentType="movie"))
|
text_color=color2, contentType="movie", quality=calidad, language=audios))
|
||||||
|
|
||||||
next_page = scrapertools.find_single_match(data, 'href="([^"]+)"[^>]+>Siguiente')
|
next_page = scrapertools.find_single_match(data, 'href="([^"]+)"[^>]+>Siguiente')
|
||||||
if next_page != "" and item.title != "":
|
if next_page != "" and item.title != "":
|
||||||
@@ -676,7 +676,7 @@ def get_enlaces(item, url, type):
|
|||||||
titulo = " [%s/%s]" % (language, scrapedcalidad.strip())
|
titulo = " [%s/%s]" % (language, scrapedcalidad.strip())
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(action="play", url=google_url, title=" Ver en Gvideo" + titulo, text_color=color2,
|
item.clone(action="play", url=google_url, title=" Ver en Gvideo" + titulo, text_color=color2,
|
||||||
extra="", server="gvideo"))
|
extra="", server="gvideo", language=language, quality=scrapedcalidad.strip()))
|
||||||
patron = '<div class="available-source".*?data-url="([^"]+)".*?class="language.*?title="([^"]+)"' \
|
patron = '<div class="available-source".*?data-url="([^"]+)".*?class="language.*?title="([^"]+)"' \
|
||||||
'.*?class="source-name.*?>\s*([^<]+)<.*?<span class="quality-text">([^<]+)<'
|
'.*?class="source-name.*?>\s*([^<]+)<.*?<span class="quality-text">([^<]+)<'
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ def peliculas(item):
|
|||||||
patron += 'href="([^"]+)"'
|
patron += 'href="([^"]+)"'
|
||||||
patron += '.*?(?:<span>|<span class="year">)([^<]+)'
|
patron += '.*?(?:<span>|<span class="year">)([^<]+)'
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
for scrapedthumbnail, scrapedtitle, calidad, scrapedurl, scrapedyear in matches:
|
for scrapedthumbnail, scrapedtitle, quality, scrapedurl, scrapedyear in matches:
|
||||||
calidad = scrapertools.find_single_match(calidad, '.*?quality">([^<]+)')
|
quality = scrapertools.find_single_match(quality, '.*?quality">([^<]+)')
|
||||||
try:
|
try:
|
||||||
fulltitle = scrapedtitle
|
fulltitle = scrapedtitle
|
||||||
year = scrapedyear.replace(" ", "")
|
year = scrapedyear.replace(" ", "")
|
||||||
@@ -143,11 +143,11 @@ def peliculas(item):
|
|||||||
scrapedtitle = "%s (%s)" % (fulltitle, year)
|
scrapedtitle = "%s (%s)" % (fulltitle, year)
|
||||||
except:
|
except:
|
||||||
fulltitle = scrapedtitle
|
fulltitle = scrapedtitle
|
||||||
if calidad:
|
if quality:
|
||||||
scrapedtitle += " [%s]" % calidad
|
scrapedtitle += " [%s]" % quality
|
||||||
new_item = item.clone(action="findvideos", title=scrapedtitle, fulltitle=fulltitle,
|
new_item = item.clone(action="findvideos", title=scrapedtitle, fulltitle=fulltitle,
|
||||||
url=scrapedurl, thumbnail=scrapedthumbnail,
|
url=scrapedurl, thumbnail=scrapedthumbnail,
|
||||||
contentTitle=fulltitle, contentType="movie")
|
contentTitle=fulltitle, contentType="movie", quality=quality)
|
||||||
if year:
|
if year:
|
||||||
new_item.infoLabels['year'] = int(year)
|
new_item.infoLabels['year'] = int(year)
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
@@ -330,12 +330,14 @@ def bloque_enlaces(data, filtro_idioma, dict_idiomas, type, item):
|
|||||||
if filtro_idioma == 3 or item.filtro:
|
if filtro_idioma == 3 or item.filtro:
|
||||||
lista_enlaces.append(item.clone(title=title, action="play", text_color=color2,
|
lista_enlaces.append(item.clone(title=title, action="play", text_color=color2,
|
||||||
url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage,
|
url=scrapedurl, server=scrapedserver, idioma=scrapedlanguage,
|
||||||
extra=item.url, contentThumbnail = item.thumbnail))
|
extra=item.url, contentThumbnail = item.thumbnail,
|
||||||
|
language=scrapedlanguage))
|
||||||
else:
|
else:
|
||||||
idioma = dict_idiomas[language]
|
idioma = dict_idiomas[language]
|
||||||
if idioma == filtro_idioma:
|
if idioma == filtro_idioma:
|
||||||
lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl,
|
lista_enlaces.append(item.clone(title=title, text_color=color2, action="play", url=scrapedurl,
|
||||||
extra=item.url, contentThumbnail = item.thumbnail))
|
extra=item.url, contentThumbnail = item.thumbnail,
|
||||||
|
language=scrapedlanguage))
|
||||||
else:
|
else:
|
||||||
if language not in filtrados:
|
if language not in filtrados:
|
||||||
filtrados.append(language)
|
filtrados.append(language)
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ def findvideos(item):
|
|||||||
if "partes" in title:
|
if "partes" in title:
|
||||||
action = "extract_url"
|
action = "extract_url"
|
||||||
new_item = Item(channel=item.channel, action=action, title=title, fulltitle=title, url=url,
|
new_item = Item(channel=item.channel, action=action, title=title, fulltitle=title, url=url,
|
||||||
thumbnail=thumbnail, plot=plot, parentContent=item, server = servername)
|
thumbnail=thumbnail, plot=plot, parentContent=item, server = servername, quality=calidad)
|
||||||
if comentarios.startswith("Ver en"):
|
if comentarios.startswith("Ver en"):
|
||||||
itemlist_ver.append(new_item)
|
itemlist_ver.append(new_item)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -203,9 +203,10 @@ def newest(categoria):
|
|||||||
# categoria='peliculas'
|
# categoria='peliculas'
|
||||||
try:
|
try:
|
||||||
if categoria == 'peliculas':
|
if categoria == 'peliculas':
|
||||||
item.url = host
|
item.url = host +'peliculas/page/1'
|
||||||
elif categoria == 'infantiles':
|
elif categoria == 'infantiles':
|
||||||
item.url = host + 'category/animacion/'
|
item.url = host + 'categoria/animacion/'
|
||||||
|
|
||||||
itemlist = lista(item)
|
itemlist = lista(item)
|
||||||
if itemlist[-1].title == 'Siguiente >>>':
|
if itemlist[-1].title == 'Siguiente >>>':
|
||||||
itemlist.pop()
|
itemlist.pop()
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ def fichas(item):
|
|||||||
contentTitle = scrapedtitle.strip()
|
contentTitle = scrapedtitle.strip()
|
||||||
|
|
||||||
if scrapedlangs != ">":
|
if scrapedlangs != ">":
|
||||||
textoidiomas = 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 += bbcode_kodi2html(" ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])")
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ def fichas(item):
|
|||||||
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,
|
||||||
show=show, folder=True, contentType=contentType, contentTitle=contentTitle,
|
show=show, folder=True, contentType=contentType, contentTitle=contentTitle,
|
||||||
language =textoidiomas, infoLabels=infoLabels))
|
language =language, infoLabels=infoLabels))
|
||||||
|
|
||||||
## Paginación
|
## Paginación
|
||||||
next_page_url = scrapertools.find_single_match(data, '<a href="([^"]+)">.raquo;</a>')
|
next_page_url = scrapertools.find_single_match(data, '<a href="([^"]+)">.raquo;</a>')
|
||||||
@@ -797,16 +797,17 @@ def agrupa_datos(data):
|
|||||||
|
|
||||||
def extrae_idiomas(bloqueidiomas):
|
def extrae_idiomas(bloqueidiomas):
|
||||||
logger.info("idiomas=" + bloqueidiomas)
|
logger.info("idiomas=" + bloqueidiomas)
|
||||||
# Todo cambiar por lista
|
language=[]
|
||||||
#textoidiomas=[]
|
|
||||||
textoidiomas = ''
|
textoidiomas = ''
|
||||||
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)
|
||||||
for idioma in idiomas:
|
for idioma in idiomas:
|
||||||
|
# TODO quitar esto
|
||||||
textoidiomas = textoidiomas + idioma +" "
|
textoidiomas = textoidiomas + idioma +" "
|
||||||
#textoidiomas.append(idioma.upper())
|
# TODO y dejar esto
|
||||||
|
language.append(idioma)
|
||||||
|
|
||||||
return textoidiomas
|
return textoidiomas, language
|
||||||
|
|
||||||
|
|
||||||
def bbcode_kodi2html(text):
|
def bbcode_kodi2html(text):
|
||||||
|
|||||||
@@ -127,9 +127,8 @@ def findvideos(item):
|
|||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
for url, server, calidad, idioma in matches:
|
for url, server, calidad, idioma in matches:
|
||||||
title = item.contentTitle
|
|
||||||
server = servertools.get_server_from_url(url)
|
server = servertools.get_server_from_url(url)
|
||||||
|
title = '%s [%s] [%s] [%s]' % (item.contentTitle, server, calidad, idioma)
|
||||||
itemlist.append(item.clone(action="play", title=title, fulltitle = item.title, url=url, language = idioma,
|
itemlist.append(item.clone(action="play", title=title, fulltitle = item.title, url=url, language = idioma,
|
||||||
contentTitle = item.contentTitle, quality = calidad, server = server))
|
contentTitle = item.contentTitle, quality = calidad, server = server))
|
||||||
|
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ 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)
|
||||||
|
|
||||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title
|
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?' # img, title
|
||||||
patron += '<div class="rating"><span class="[^"]+"></span>([^<]+).*?' # rating
|
patron += '<div class="rating"><span class="[^"]+"></span>([^<]+).*?' # rating
|
||||||
patron += '<span class="quality">([^<]+)</span><a href="([^"]+)">.*?' # calidad, url
|
patron += '<span class="quality">([^<]+)</span><a href="([^"]+)">.*?' # calidad, url
|
||||||
patron += '<span>([^<]+)</span>' # year
|
patron += '<span>([^<]+)</span>' # year
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ def series(item):
|
|||||||
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
data = re.sub(r"\n|\r|\t| |<br>", "", data)
|
||||||
# logger.info(data)
|
# logger.info(data)
|
||||||
|
|
||||||
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?<a href="([^"]+)">'
|
patron = '<div class="poster"><img src="([^"]+)" alt="([^"]+)">.*?<a href="([^"]+)">' # img, title, url
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
@@ -323,8 +323,8 @@ def temporadas(item):
|
|||||||
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)
|
||||||
# logger.info(data)
|
# logger.info(data)
|
||||||
patron = '<span class="title">([^<]+)<i>.*?' # numeros de temporadas
|
patron = '<span class="title">([^<]+)<i>.*?' # season
|
||||||
patron += '<img src="([^"]+)"></a></div>' # capítulos
|
patron += '<img src="([^"]+)"></a></div>' # img
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
if len(matches) > 1:
|
if len(matches) > 1:
|
||||||
@@ -365,9 +365,9 @@ def episodios(item):
|
|||||||
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)
|
||||||
# logger.info(data)
|
# logger.info(data)
|
||||||
patron = '<div class="imagen"><a href="([^"]+)">.*?' # url cap, img
|
patron = '<div class="imagen"><a href="([^"]+)">.*?' # url
|
||||||
patron += '<div class="numerando">(.*?)</div>.*?' # numerando cap
|
patron += '<div class="numerando">(.*?)</div>.*?' # numerando cap
|
||||||
patron += '<a href="[^"]+">([^<]+)</a>' # title de episodios
|
patron += '<a href="[^"]+">([^<]+)</a>' # title de episodios
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, patron)
|
matches = scrapertools.find_multiple_matches(data, patron)
|
||||||
|
|
||||||
@@ -390,7 +390,6 @@ def episodios(item):
|
|||||||
new_item.infoLabels['episode'] = episode.zfill(2)
|
new_item.infoLabels['episode'] = episode.zfill(2)
|
||||||
|
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
|
||||||
|
|
||||||
# TODO no hacer esto si estamos añadiendo a la videoteca
|
# TODO no hacer esto si estamos añadiendo a la videoteca
|
||||||
if not item.extra:
|
if not item.extra:
|
||||||
@@ -407,6 +406,8 @@ def episodios(item):
|
|||||||
itemlist.sort(key=lambda it: int(it.infoLabels['episode']),
|
itemlist.sort(key=lambda it: int(it.infoLabels['episode']),
|
||||||
reverse=config.get_setting('orden_episodios', __channel__))
|
reverse=config.get_setting('orden_episodios', __channel__))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, __modo_grafico__)
|
||||||
|
|
||||||
# Opción "Añadir esta serie a la videoteca"
|
# Opción "Añadir esta serie a la videoteca"
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url,
|
itemlist.append(Item(channel=__channel__, title="Añadir esta serie a la videoteca", url=item.url,
|
||||||
@@ -427,12 +428,13 @@ def findvideos(item):
|
|||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
for option, url in matches:
|
for option, url in matches:
|
||||||
lang = scrapertools.find_single_match(data, '<li><a class="options" href="#option-%s">.*?<img '
|
lang = scrapertools.find_single_match(data, '<li><a class="options" href="#option-%s">.*?</b>-->(\w+)' % option)
|
||||||
'src="http://pedropolis.com/wp-content/themes/dooplay/assets/img'
|
lang = lang.lower()
|
||||||
'/flags/(\w+)' % option)
|
idioma = {'latino': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
||||||
idioma = {'mx': '[COLOR cornflowerblue](LAT)[/COLOR]', 'pe': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
'drive': '[COLOR cornflowerblue](LAT)[/COLOR]',
|
||||||
'co': '[COLOR cornflowerblue](LAT)[/COLOR]', 'es': '[COLOR green](CAST)[/COLOR]',
|
'castellano': '[COLOR green](CAST)[/COLOR]',
|
||||||
'en': '[COLOR red](VOS)[/COLOR]', 'jp': '[COLOR green](VOS)[/COLOR]'}
|
'subtitulado': '[COLOR red](VOS)[/COLOR]',
|
||||||
|
'ingles': '[COLOR red](VOS)[/COLOR]'}
|
||||||
if lang in idioma:
|
if lang in idioma:
|
||||||
lang = idioma[lang]
|
lang = idioma[lang]
|
||||||
|
|
||||||
@@ -455,10 +457,8 @@ def findvideos(item):
|
|||||||
x.server.title(), x.quality, x.language)
|
x.server.title(), x.quality, x.language)
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'serie':
|
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'serie':
|
||||||
itemlist.append(Item(channel=__channel__,
|
itemlist.append(Item(channel=__channel__, url=item.url, action="add_pelicula_to_library", extra="findvideos",
|
||||||
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
title='[COLOR yellow]Añadir esta pelicula a la videoteca[/COLOR]',
|
||||||
url=item.url, action="add_pelicula_to_library",
|
thumbnail=get_thumb("videolibrary_movie.png"), contentTitle=item.contentTitle))
|
||||||
thumbnail=get_thumb("videolibrary_movie.png"),
|
|
||||||
extra="findvideos", contentTitle=item.contentTitle))
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
@@ -213,9 +213,10 @@ def findvideos(item):
|
|||||||
|
|
||||||
if 'openload' in url:
|
if 'openload' in url:
|
||||||
url = url + '|' + item.url
|
url = url + '|' + item.url
|
||||||
|
extra_info = title.split(' - ')
|
||||||
title = "%s - %s" % ('%s', title)
|
title = "%s - %s" % ('%s', title)
|
||||||
itemlist.append(Item(channel=item.channel, action="play", url=url, title=title, text_color=color3))
|
itemlist.append(Item(channel=item.channel, action="play", url=url, title=title, language=extra_info[0],
|
||||||
|
quality=extra_info[1],text_color=color3))
|
||||||
|
|
||||||
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())
|
||||||
|
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ def findvideos(item):
|
|||||||
videoitem.quality = 'default'
|
videoitem.quality = 'default'
|
||||||
videoitem.language = 'Latino'
|
videoitem.language = 'Latino'
|
||||||
if videoitem.server != '':
|
if videoitem.server != '':
|
||||||
videoitem.thumbnail = item.contentThumbnail
|
videoitem.thumbnail = item.thumbnail
|
||||||
else:
|
else:
|
||||||
videoitem.thumbnail = item.thumbnail
|
videoitem.thumbnail = item.thumbnail
|
||||||
videoitem.server = 'directo'
|
videoitem.server = 'directo'
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ def findvideos(item):
|
|||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.channel = item.channel
|
videoitem.channel = item.channel
|
||||||
videoitem.action = 'play'
|
videoitem.action = 'play'
|
||||||
videoitem.thumbnail = servertools.guess_server_thumbnail(videoitem.server)
|
videoitem.thumbnail = item.thumbnail
|
||||||
videoitem.infoLabels = item.infoLabels
|
videoitem.infoLabels = item.infoLabels
|
||||||
videoitem.title = item.contentTitle + ' (' + videoitem.server + ')'
|
videoitem.title = item.contentTitle + ' (' + videoitem.server + ')'
|
||||||
if 'youtube' in videoitem.url:
|
if 'youtube' in videoitem.url:
|
||||||
|
|||||||
Reference in New Issue
Block a user