maxipelis24:correcciones
This commit is contained in:
@@ -28,11 +28,11 @@ def mainlist(item):
|
||||
itemlist.append(Item(channel=item.channel, title="Peliculas",
|
||||
action="movies", url=host, page=0, thumbnail=get_thumb('movies', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Año de Estreno",
|
||||
url=host, cat='year', page=0, thumbnail=get_thumb('year', auto=True)))
|
||||
url=host, cat='year', thumbnail=get_thumb('year', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Géneros",
|
||||
url=host, cat='genre', page=0, thumbnail=get_thumb('genres', auto=True)))
|
||||
url=host, cat='genre', thumbnail=get_thumb('genres', auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, action="category", title="Calidad",
|
||||
url=host, cat='quality', page=0, thumbnail=get_thumb("quality", auto=True)))
|
||||
url=host, cat='quality', thumbnail=get_thumb("quality", auto=True)))
|
||||
itemlist.append(Item(channel=item.channel, title="Buscar", action="search",
|
||||
url=host + "?s=", page=0, thumbnail=get_thumb("search", auto=True)))
|
||||
|
||||
@@ -53,17 +53,18 @@ def category(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
|
||||
if item.cat == 'genre':
|
||||
data = scrapertools.find_single_match(
|
||||
data, '<h3>Géneros <span class="icon-sort">.*?</ul>')
|
||||
patron = '<li class="cat-item cat-item.*?<a href="([^"]+)" >([^<]+)<'
|
||||
patron = '<li class="cat-item cat-item.*?<a href="([^"]+)".*?>([^<]+)<'
|
||||
elif item.cat == 'year':
|
||||
data = scrapertools.find_single_match(
|
||||
data, '<h3>Año de estreno.*?</div>')
|
||||
patron = 'li><a href="([^"]+)">([^<]+).*?<'
|
||||
patron = 'li><a href="([^"]+)".*?>([^<]+).*?<'
|
||||
elif item.cat == 'quality':
|
||||
data = scrapertools.find_single_match(data, '<h3>Calidad.*?</div>')
|
||||
patron = 'li><a href="([^"]+)">([^<]+)<'
|
||||
patron = 'li><a href="([^"]+)".*?>([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(Item(channel=item.channel, action='movies',
|
||||
@@ -81,7 +82,7 @@ def movies(item):
|
||||
patron += '<span class="ttx">([^<]+).*?'
|
||||
patron += 'class="year">([^<]+).+?class="calidad2">([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl, img, scrapedtitle, resto, year, quality in matches[item.page:item.page + 30]:
|
||||
for scrapedurl, img, scrapedtitle, resto, year, quality in matches[item.page:item.page + 20]:
|
||||
scrapedtitle = re.sub(r' \((\d+)\)', '', scrapedtitle)
|
||||
plot = scrapertools.htmlclean(resto).strip()
|
||||
title = ' %s [COLOR red][%s][/COLOR]' % (scrapedtitle, quality)
|
||||
@@ -97,14 +98,15 @@ def movies(item):
|
||||
infoLabels={'year': year}))
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
# Paginacion
|
||||
if item.page + 30 < len(matches):
|
||||
itemlist.append(item.clone(page=item.page + 30, title=">> Siguiente"))
|
||||
if item.page + 20 < len(matches):
|
||||
itemlist.append(item.clone(page=item.page + 20, title=">> Siguiente"))
|
||||
else:
|
||||
next_page = scrapertools.find_single_match(
|
||||
data, 'class="respo_pag"><div class="pag.*?<a href="([^"]+)" >Siguiente</a><')
|
||||
data, '<link rel="next" href="([^"]+)" />')
|
||||
if next_page:
|
||||
itemlist.append(item.clone(
|
||||
url=next_page, page=0, title=">> Siguiente"))
|
||||
itemlist.append(item.clone(url=next_page, page=0,
|
||||
title=" Siguiente »"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -113,7 +115,8 @@ def findvideos(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
data1= scrapertools.find_single_match(data,'<ul class="idTabs">.*?</ul></div>')
|
||||
data1 = scrapertools.find_single_match(
|
||||
data, '<ul class="idTabs">.*?</ul></div>')
|
||||
patron = "li>.*?href=.*?>([^\s]+)"
|
||||
matches1 = re.compile(patron, re.DOTALL).findall(data1)
|
||||
for lang in matches1:
|
||||
@@ -136,7 +139,6 @@ def findvideos(item):
|
||||
url = video_data.headers['location']
|
||||
title = '%s'
|
||||
|
||||
|
||||
else:
|
||||
patron = '<div id="div.*?<div class="movieplay".*?(?:iframe.*?src|IFRAME SRC)="([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
@@ -144,9 +146,10 @@ def findvideos(item):
|
||||
url = link
|
||||
title = '%s'
|
||||
new_item = Item(channel=item.channel, title=title, url=url,
|
||||
action='play', language= IDIOMAS[idioma], infoLabels=item.infoLabels)
|
||||
action='play', language=IDIOMAS[idioma], infoLabels=item.infoLabels)
|
||||
itemlist.append(new_item)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % '%s [%s]'%(i.server.capitalize(),i.language))
|
||||
itemlist = servertools.get_servers_itemlist(
|
||||
itemlist, lambda i: i.title % '%s [%s]' % (i.server.capitalize(), i.language))
|
||||
#itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
if itemlist:
|
||||
if config.get_videolibrary_support():
|
||||
|
||||
Reference in New Issue
Block a user