Ajustes a canales varios

This commit is contained in:
Unknown
2017-10-10 15:22:14 -03:00
parent 7333b5da76
commit 8dca67daa8
10 changed files with 35 additions and 29 deletions

View File

@@ -104,9 +104,10 @@ def peliculas(item):
new_item = Item(channel=item.channel, action="findvideos", title=title, url=url, thumbnail=thumbnail, plot=plot,
contentTitle = contentTitle , infoLabels={'year':year} )
if year:
tmdb.set_infoLabels_item(new_item)
#if year:
# tmdb.set_infoLabels_item(new_item)
itemlist.append(new_item)
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
try:
patron = '<a href="([^"]+)" ><span class="icon-chevron-right"></span></a></div>'
next_page = re.compile(patron,re.DOTALL).findall(data)

View File

@@ -155,6 +155,8 @@ def findvideos(item):
url = scrapedurl
server = servertools.get_server_name(servidor)
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,
thumbnail=scrapedthumbnail, language=idioma, quality=calidad, server=server))
if itemlist:

View File

@@ -76,14 +76,11 @@ def peliculas(item):
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
# 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='([^']+)"
scrapedurl = scrapertools.find_single_match(paginador, patron)
if scrapedurl:
if next_page:
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

View File

@@ -43,7 +43,7 @@ def porIdioma(item):
itemlist.append(Item(channel=item.channel, title="Castellano", action="agregadas",
url= host + "/idioma/espanol-castellano/", viewmode="movie_with_plot"))
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"))
itemlist.append(Item(channel=item.channel, title="Latino", action="agregadas",
url= host + "/idioma/espanol-latino/", viewmode="movie_with_plot"))

View File

@@ -108,13 +108,12 @@ def menupelis(item):
language = scrapertools.find_multiple_matches(extra_info, 'class="(latino|espanol|subtitulado)"')
# if language = 'ingles':
# 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,
infoLabels={'year': year})
if year:
tmdb.set_infoLabels_item(new_item)
infoLabels={'year': year}))
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
itemlist.append(new_item)
try:
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,
infoLabels={'year': year}))
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
## Paginación
# <span class="current">2</span><a href="http://www.repelis.tv/page/3"
# Si falla no muestra ">> Página siguiente"
try:
next_page = scrapertools.get_match(data, '<span class="current">\d+</span><a href="([^"]+)"')
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,
fanart=item.thumbnail, thumbnail=item.thumbnail, plot=splot, language=scrapedlang,
quality=scrapedquality, server=server))
quality=scrapedquality, server=server, infoLabels=item.infoLabels))
if itemlist:
itemlist.append(Item(channel=item.channel))
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer",

View File

@@ -119,14 +119,15 @@ def episodios(item):
scrapertools.printMatches(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)
thumbnail = ""
plot = ""
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
itemlist.append(
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:
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"'
idiomas = re.compile(patronidiomas, re.DOTALL).findall(bloqueidiomas)
textoidiomas = ""
language=[]
for idioma in idiomas:
if idioma == "1":
textoidiomas = textoidiomas + "Español" + "/"
if idioma == "2":
textoidiomas = textoidiomas + "Latino" + "/"
if idioma == "3":
textoidiomas = textoidiomas + "VOS" + "/"
textoidiomas = textoidiomas + "VOSE" + "/"
if idioma == "4":
textoidiomas = textoidiomas + "VO" + "/"
language.append(codigo_a_idioma(idioma))
textoidiomas = textoidiomas[:-1]
return textoidiomas
return textoidiomas, language
def codigo_a_idioma(codigo):
@@ -163,7 +165,7 @@ def codigo_a_idioma(codigo):
if codigo == "2":
idioma = "Latino"
if codigo == "3":
idioma = "VOS"
idioma = "VOSE"
if codigo == "4":
idioma = "VO"
@@ -195,14 +197,15 @@ def findvideos(item):
for idioma, servername, scrapedurl in matches:
title = "Mirror en " + servername + " (" + codigo_a_idioma(idioma) + ")"
language = codigo_a_idioma(idioma)
url = urlparse.urljoin(item.url, scrapedurl)
thumbnail = ""
plot = ""
logger.debug("title=[" + title + "], url=[" + url + "], thumbnail=[" + thumbnail + "]")
itemlist.append(
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

View File

@@ -108,7 +108,7 @@ def lista(item):
actual_page_url = item.url
next_page = scrapertools.find_single_match(data, '<div class=pag_b><a href=(.*?) >Siguiente<\/a><\/div>')
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'))
return itemlist

View File

@@ -144,7 +144,7 @@ def lista_gen(item):
context1=[renumbertools.context(item), autoplay.context]
itemlist.append(
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)
# Paginacion

View File

@@ -171,12 +171,13 @@ def findvideos(item):
matches = re.compile(pattern, re.S).findall(data)
for url, server, lang in matches:
title = "[%s] - [%s]" % (lang, server)
for url, server, language in matches:
title = "[%s] - [%s]" % (language, server)
url = host + url
server = re.sub('(\..*)', '', server)
logger.debug("url %s" % 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
@@ -191,5 +192,6 @@ def play(item):
for video_item in itemlist:
video_item.title = "%s [%s]" % (item.fulltitle, item.lang)
video_item.thumbnail = item.thumbnail
video_item.language = item.language
return itemlist

View File

@@ -13,7 +13,7 @@ from platformcode import config, logger
host = 'http://verpeliculasnuevas.com'
IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOS'}
IDIOMAS = {'latino': 'Latino', 'castellano': 'Español', 'sub': 'VOSE'}
list_language = IDIOMAS.values()
taudio = {'latino': '[COLOR limegreen]LATINO[/COLOR]',