qserie: fix
This commit is contained in:
@@ -215,8 +215,7 @@ def generos(item):
|
|||||||
|
|
||||||
for scrapedtitle, scrapedurl in matches:
|
for scrapedtitle, scrapedurl in matches:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
title = scrapedtitle.decode('cp1252')
|
title = scrapedtitle.capitalize()
|
||||||
title = title.encode('utf-8')
|
|
||||||
if title.lower() in tgenero:
|
if title.lower() in tgenero:
|
||||||
thumbnail = tgenero[title.lower()]
|
thumbnail = tgenero[title.lower()]
|
||||||
fanart = tgenero[title.lower()]
|
fanart = tgenero[title.lower()]
|
||||||
@@ -225,7 +224,7 @@ def generos(item):
|
|||||||
fanart = ''
|
fanart = ''
|
||||||
plot = ''
|
plot = ''
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="todas", title=title.lower(), fulltitle=item.fulltitle, url=url,
|
Item(channel=item.channel, action="todas", title=title, fulltitle=item.fulltitle, url=url,
|
||||||
thumbnail=thumbnail, plot=plot, fanart=fanart))
|
thumbnail=thumbnail, plot=plot, fanart=fanart))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -241,19 +240,12 @@ def ultimas(item):
|
|||||||
|
|
||||||
for scrapedtitle, scrapedurl in matches:
|
for scrapedtitle, scrapedurl in matches:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
data = httptools.downloadpage(scrapedurl).data
|
season = scrapertools.find_single_match(scrapedtitle, 'Temporada (\d+)')
|
||||||
thumbnail = scrapertools.get_match(data, '<link rel="image_src" href="([^"]+)"/>')
|
title = scrapertools.find_single_match(scrapedtitle, '(.*?) Temporada')
|
||||||
realplot = scrapertools.find_single_match(data, '<p itemprop="articleBody">([^<]+)<\/p> ')
|
|
||||||
plot = scrapertools.remove_htmltags(realplot)
|
|
||||||
inutil = re.findall(r' Temporada \d', scrapedtitle)
|
|
||||||
title = scrapedtitle
|
|
||||||
title = scrapertools.decodeHtmlentities(title)
|
|
||||||
realtitle = scrapedtitle.replace(inutil[0], '')
|
|
||||||
fanart = 'https://s22.postimg.cc/cb7nmhwv5/ultimas.png'
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel, action="temporadas", title=title, url=url, thumbnail=thumbnail, plot=plot,
|
Item(channel=item.channel, action="temporadas", title=scrapedtitle, url=url, contentSerieName=title,
|
||||||
fanart=fanart, contentSerieName=realtitle))
|
contentSeasonNumber=season, infoLabels={'season':season}))
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -290,42 +282,38 @@ def lasmas(item):
|
|||||||
|
|
||||||
logger.info()
|
logger.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
data = httptools.downloadpage(item.url).data
|
base_data = httptools.downloadpage(item.url).data
|
||||||
realplot = ''
|
base_data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", base_data)
|
||||||
|
thumbnail = ''
|
||||||
if item.extra == 'letras':
|
if item.extra == 'letras':
|
||||||
patron = '<li><a href="([^"]+)" title="Series que comienzan con.*?">([^<]+)</a></li>'
|
data = base_data
|
||||||
|
patron = '<li><a href=([^ ]+) title=Series que comienzan con.*?>([^<]+)</a></li>'
|
||||||
else:
|
else:
|
||||||
patron = '<a href="([^"]+)" title="([^V]+)' + item.extra + '.*?">'
|
if item.extra == 'Vista':
|
||||||
|
type = 'Vistas'
|
||||||
|
else:
|
||||||
|
type = 'Votadas'
|
||||||
|
data = scrapertools.find_single_match(base_data, 'white>Las m.s %s <span(.*?)</a>(?:</div>|</center>)' %
|
||||||
|
type)
|
||||||
|
patron = '<a href=([^ ]+) title=(.*?) ' + item.extra
|
||||||
|
|
||||||
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:
|
||||||
url = urlparse.urljoin(item.url, scrapedurl)
|
url = urlparse.urljoin(item.url, scrapedurl)
|
||||||
if item.extra != 'letras':
|
if item.extra != 'letras':
|
||||||
data = httptools.downloadpage(scrapedurl).data
|
|
||||||
thumbnail = scrapertools.get_match(data, '<link rel="image_src" href="([^"]+)"/>')
|
|
||||||
realplot = scrapertools.find_single_match(data, '<p itemprop="articleBody">([^<]+)<\/p> ')
|
|
||||||
plot = scrapertools.remove_htmltags(realplot)
|
|
||||||
action = 'temporadas'
|
action = 'temporadas'
|
||||||
else:
|
else:
|
||||||
if scrapedtitle.lower() in thumbletras:
|
if scrapedtitle.lower() in thumbletras:
|
||||||
thumbnail = thumbletras[scrapedtitle.lower()]
|
thumbnail = thumbletras[scrapedtitle.lower()]
|
||||||
else:
|
|
||||||
thumbnail = ''
|
|
||||||
plot = ''
|
|
||||||
action = 'todas'
|
action = 'todas'
|
||||||
title = scrapedtitle.replace(': ', '')
|
title = scrapedtitle.replace(': ', '')
|
||||||
title = scrapertools.decodeHtmlentities(title)
|
title = scrapertools.decodeHtmlentities(title)
|
||||||
if item.extra == 'letras':
|
|
||||||
fanart = 'https://s17.postimg.cc/fwi1y99en/a-z.png'
|
|
||||||
elif item.extra == 'Vista':
|
|
||||||
fanart = 'https://s9.postimg.cc/wmhzu9d7z/vistas.png'
|
|
||||||
else:
|
|
||||||
fanart = ''
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel, action=action, title=title, url=url, thumbnail=thumbnail, plot=plot,
|
|
||||||
fanart=fanart, contentSerieName=scrapedtitle))
|
|
||||||
|
|
||||||
|
itemlist.append(Item(channel=item.channel, action=action, title=title, url=url,
|
||||||
|
thumbnail=thumbnail, contentSerieName=scrapedtitle))
|
||||||
|
if item.extra != 'letras':
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user