Ajustes a canales varios
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -43,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"))
|
||||||
|
|||||||
@@ -108,13 +108,12 @@ def menupelis(item):
|
|||||||
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':
|
# if language = 'ingles':
|
||||||
# language='vo'
|
# language='vo'
|
||||||
new_item=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, language=language, quality=quality,
|
thumbnail=thumbnail, fanart=thumbnail, language=language, quality=quality,
|
||||||
infoLabels={'year': year})
|
infoLabels={'year': year}))
|
||||||
if year:
|
|
||||||
tmdb.set_infoLabels_item(new_item)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
itemlist.append(new_item)
|
|
||||||
|
|
||||||
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="([^"]+)"')
|
||||||
@@ -190,10 +189,12 @@ 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}))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
## Paginación
|
## Paginación
|
||||||
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
|
||||||
|
|
||||||
# Si falla no muestra ">> Página siguiente"
|
# 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]"
|
||||||
@@ -258,7 +259,7 @@ def findvideos(item):
|
|||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url,
|
itemlist.append(Item(channel=item.channel, action="play", title=scrapedtitle, extra=title, url=url,
|
||||||
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
|
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
|
||||||
quality=scrapedquality, server=server))
|
quality=scrapedquality, server=server, infoLabels=item.infoLabels))
|
||||||
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",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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]',
|
||||||
|
|||||||
Reference in New Issue
Block a user