Update allcalidad.py
This commit is contained in:
@@ -8,19 +8,17 @@ from platformcode import config, logger
|
|||||||
|
|
||||||
host = "http://allcalidad.com/"
|
host = "http://allcalidad.com/"
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
itemlist.append(Item(channel=item.channel, title="Novedades", action="peliculas", url=host))
|
itemlist.append(Item(channel = item.channel, title = "Novedades", action = "peliculas", url = host))
|
||||||
itemlist.append(Item(channel=item.channel, title="Por género", action="generos_years", url=host, extra="Genero"))
|
itemlist.append(Item(channel = item.channel, title = "Por género", action = "generos_years", url = host, extra = "Genero" ))
|
||||||
itemlist.append(Item(channel=item.channel, title="Por año", action="generos_years", url=host, extra=">Año<"))
|
itemlist.append(Item(channel = item.channel, title = "Por año", action = "generos_years", url = host, extra = ">Año<"))
|
||||||
itemlist.append(Item(channel=item.channel, title="Favoritas", action="peliculas", url=host + "/favorites"))
|
itemlist.append(Item(channel = item.channel, title = "Favoritas", action = "peliculas", url = host + "/favorites" ))
|
||||||
itemlist.append(Item(channel=item.channel, title=""))
|
itemlist.append(Item(channel = item.channel, title = ""))
|
||||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search", url=host + "?s="))
|
itemlist.append(Item(channel = item.channel, title = "Buscar", action = "search", url = host + "?s="))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
@@ -57,16 +55,16 @@ def generos_years(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
patron = '(?s)%s(.*?)</ul></div>' % item.extra
|
patron = '(?s)%s(.*?)</ul></div>' %item.extra
|
||||||
bloque = scrapertools.find_single_match(data, patron)
|
bloque = scrapertools.find_single_match(data, patron)
|
||||||
patron = 'href="([^"]+)'
|
patron = 'href="([^"]+)'
|
||||||
patron += '">([^<]+)'
|
patron += '">([^<]+)'
|
||||||
matches = scrapertools.find_multiple_matches(bloque, patron)
|
matches = scrapertools.find_multiple_matches(bloque, patron)
|
||||||
for url, titulo in matches:
|
for url, titulo in matches:
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel = item.channel,
|
||||||
action="peliculas",
|
action = "peliculas",
|
||||||
title=titulo,
|
title = titulo,
|
||||||
url=url
|
url = url
|
||||||
))
|
))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -86,22 +84,22 @@ def peliculas(item):
|
|||||||
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 + ") (" + year + ")"
|
mtitulo = titulo + " (" + idioma + ") (" + year + ")"
|
||||||
new_item = Item(channel=item.channel,
|
new_item = Item(channel = item.channel,
|
||||||
action="findvideos",
|
action = "findvideos",
|
||||||
title=mtitulo,
|
title = mtitulo,
|
||||||
fulltitle=titulo,
|
fulltitle = titulo,
|
||||||
thumbnail=thumbnail,
|
thumbnail = thumbnail,
|
||||||
url=url,
|
url = url,
|
||||||
contentTitle=titulo,
|
contentTitle = titulo,
|
||||||
contentType="movie"
|
contentType="movie"
|
||||||
)
|
)
|
||||||
if year:
|
if year:
|
||||||
new_item.infoLabels['year'] = int(year)
|
new_item.infoLabels['year'] = int(year)
|
||||||
itemlist.append(new_item)
|
itemlist.append(new_item)
|
||||||
url_pagina = scrapertools.find_single_match(data, 'next" href="([^"]+)')
|
url_pagina = scrapertools.find_single_match(data, 'next" href="([^"]+)')
|
||||||
if url_pagina != "":
|
if url_pagina != "":
|
||||||
pagina = "Pagina: " + scrapertools.find_single_match(url_pagina, "page/([0-9]+)")
|
pagina = "Pagina: " + scrapertools.find_single_match(url_pagina, "page/([0-9]+)")
|
||||||
itemlist.append(Item(channel=item.channel, action="peliculas", title=pagina, url=url_pagina))
|
itemlist.append(Item(channel = item.channel, action = "peliculas", title = pagina, url = url_pagina))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -120,25 +118,24 @@ def findvideos(item):
|
|||||||
elif "vimeo" in url:
|
elif "vimeo" in url:
|
||||||
url += "|" + "http://www.allcalidad.com"
|
url += "|" + "http://www.allcalidad.com"
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel = item.channel,
|
||||||
action="play",
|
action = "play",
|
||||||
title=titulo,
|
title = titulo,
|
||||||
fulltitle=item.fulltitle,
|
fulltitle = item.fulltitle,
|
||||||
thumbnail=item.thumbnail,
|
thumbnail = item.thumbnail,
|
||||||
server=server,
|
server = "",
|
||||||
url=url
|
url = url
|
||||||
))
|
))
|
||||||
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))
|
||||||
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
itemlist.append(item.clone(channel="trailertools", title="Buscar Tráiler", action="buscartrailer", context="",
|
||||||
text_color="magenta"))
|
text_color="magenta"))
|
||||||
# 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,
|
filtro=True, action="add_pelicula_to_library", url=item.url, thumbnail = item.thumbnail,
|
||||||
thumbnail=item.thumbnail,
|
|
||||||
infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle,
|
infoLabels={'title': item.fulltitle}, fulltitle=item.fulltitle,
|
||||||
extra="library"))
|
extra="library"))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Reference in New Issue
Block a user