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