Fixes
This commit is contained in:
@@ -273,13 +273,13 @@ def listado_series(item):
|
|||||||
def fichas(item):
|
def fichas(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
textoidiomas=''
|
||||||
|
infoLabels=dict()
|
||||||
## Carga estados
|
## Carga estados
|
||||||
status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data)
|
status = jsontools.load(httptools.downloadpage(host + '/a/status/all').data)
|
||||||
|
|
||||||
if item.title == "Buscar...":
|
if item.title == "Buscar...":
|
||||||
data = agrupa_datos(httptools.downloadpage(item.url, post=item.extra).data)
|
data = agrupa_datos(httptools.downloadpage(item.url, post=item.extra).data)
|
||||||
|
|
||||||
s_p = scrapertools.get_match(data, '<h3 class="section-title">(.*?)<div id="footer-wrapper">').split(
|
s_p = scrapertools.get_match(data, '<h3 class="section-title">(.*?)<div id="footer-wrapper">').split(
|
||||||
'<h3 class="section-title">')
|
'<h3 class="section-title">')
|
||||||
|
|
||||||
@@ -320,10 +320,12 @@ def fichas(item):
|
|||||||
|
|
||||||
if scrapedlangs != ">":
|
if scrapedlangs != ">":
|
||||||
textoidiomas = extrae_idiomas(scrapedlangs)
|
textoidiomas = extrae_idiomas(scrapedlangs)
|
||||||
|
#Todo Quitar el idioma
|
||||||
title += bbcode_kodi2html(" ( [COLOR teal][B]" + textoidiomas + "[/B][/COLOR])")
|
title += bbcode_kodi2html(" ( [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
|
||||||
title += bbcode_kodi2html(" ([COLOR orange]" + valoracion + "[/COLOR])")
|
title += bbcode_kodi2html(" ([COLOR orange]" + valoracion + "[/COLOR])")
|
||||||
|
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
@@ -349,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+'x'))
|
language =textoidiomas, 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>')
|
||||||
@@ -794,11 +796,14 @@ def agrupa_datos(data):
|
|||||||
|
|
||||||
def extrae_idiomas(bloqueidiomas):
|
def extrae_idiomas(bloqueidiomas):
|
||||||
logger.info("idiomas=" + bloqueidiomas)
|
logger.info("idiomas=" + bloqueidiomas)
|
||||||
|
# Todo cambiar por lista
|
||||||
|
#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)
|
||||||
textoidiomas = ""
|
|
||||||
for idioma in idiomas:
|
for idioma in idiomas:
|
||||||
textoidiomas = textoidiomas + idioma.upper() + " "
|
textoidiomas = textoidiomas + idioma +" "
|
||||||
|
#textoidiomas.append(idioma.upper())
|
||||||
|
|
||||||
return textoidiomas
|
return textoidiomas
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ def episodios(item):
|
|||||||
idiomas = " ".join(["[%s]" % IDIOMAS.get(language, "OVOS") for language in
|
idiomas = " ".join(["[%s]" % IDIOMAS.get(language, "OVOS") for language in
|
||||||
re.findall("banderas/([^\.]+)", flags, re.MULTILINE)])
|
re.findall("banderas/([^\.]+)", flags, re.MULTILINE)])
|
||||||
filter_lang = idiomas.replace("[", "").replace("]", "").split(" ")
|
filter_lang = idiomas.replace("[", "").replace("]", "").split(" ")
|
||||||
display_title = "%s - %s" % (item.show, title)
|
display_title = "%s - %s %s" % (item.show, title, idiomas)
|
||||||
# logger.debug("Episode found %s: %s" % (display_title, urlparse.urljoin(HOST, url)))
|
# logger.debug("Episode found %s: %s" % (display_title, urlparse.urljoin(HOST, url)))
|
||||||
itemlist.append(item.clone(title=display_title, url=urlparse.urljoin(HOST, url),
|
itemlist.append(item.clone(title=display_title, url=urlparse.urljoin(HOST, url),
|
||||||
action="findvideos", plot=plot, fanart=fanart, language=filter_lang))
|
action="findvideos", plot=plot, fanart=fanart, language=filter_lang))
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ def novedades(item):
|
|||||||
logger.info()
|
logger.info()
|
||||||
data = httptools.downloadpage(HOST).data
|
data = httptools.downloadpage(HOST).data
|
||||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||||
logger.debug(data)
|
|
||||||
patron = 'sidebarestdiv><a title=(.*?\d+X\d+) (.*?) href=(.*?)>.*?src=(.*?)>'
|
patron = 'sidebarestdiv><a title=(.*?\d+X\d+) (.*?) href=(.*?)>.*?src=(.*?)>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
@@ -148,7 +147,6 @@ def episodios(item):
|
|||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
for url, title, langs in episodes:
|
for url, title, langs in episodes:
|
||||||
logger.debug("langs %s" % langs)
|
|
||||||
languages = " ".join(
|
languages = " ".join(
|
||||||
["[%s]" % IDIOMAS.get(lang, lang) for lang in re.findall('images/s-([^\.]+)', langs)])
|
["[%s]" % IDIOMAS.get(lang, lang) for lang in re.findall('images/s-([^\.]+)', langs)])
|
||||||
filter_lang = languages.replace("[", "").replace("]", "").split(" ")
|
filter_lang = languages.replace("[", "").replace("]", "").split(" ")
|
||||||
@@ -221,6 +219,5 @@ def play(item):
|
|||||||
logger.info("play: %s" % item.url)
|
logger.info("play: %s" % item.url)
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
video_url = scrapertools.find_single_match(data, "location.href='([^']+)")
|
video_url = scrapertools.find_single_match(data, "location.href='([^']+)")
|
||||||
logger.debug("Video URL = %s" % video_url)
|
|
||||||
itemlist = servertools.find_video_items(data=video_url)
|
itemlist = servertools.find_video_items(data=video_url)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Reference in New Issue
Block a user