diff --git a/plugin.video.alfa/channels/qserie.py b/plugin.video.alfa/channels/qserie.py index d9d661a1..f91a6d6a 100755 --- a/plugin.video.alfa/channels/qserie.py +++ b/plugin.video.alfa/channels/qserie.py @@ -215,8 +215,7 @@ def generos(item): for scrapedtitle, scrapedurl in matches: url = urlparse.urljoin(item.url, scrapedurl) - title = scrapedtitle.decode('cp1252') - title = title.encode('utf-8') + title = scrapedtitle.capitalize() if title.lower() in tgenero: thumbnail = tgenero[title.lower()] fanart = tgenero[title.lower()] @@ -225,7 +224,7 @@ def generos(item): fanart = '' plot = '' 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)) return itemlist @@ -241,19 +240,12 @@ def ultimas(item): for scrapedtitle, scrapedurl in matches: url = urlparse.urljoin(item.url, scrapedurl) - data = httptools.downloadpage(scrapedurl).data - thumbnail = scrapertools.get_match(data, '') - realplot = scrapertools.find_single_match(data, '
([^<]+)<\/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'
+ season = scrapertools.find_single_match(scrapedtitle, 'Temporada (\d+)')
+ title = scrapertools.find_single_match(scrapedtitle, '(.*?) Temporada')
itemlist.append(
- Item(channel=item.channel, action="temporadas", title=title, url=url, thumbnail=thumbnail, plot=plot,
- fanart=fanart, contentSerieName=realtitle))
-
+ Item(channel=item.channel, action="temporadas", title=scrapedtitle, url=url, contentSerieName=title,
+ contentSeasonNumber=season, infoLabels={'season':season}))
+ tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
return itemlist
@@ -290,42 +282,38 @@ def lasmas(item):
logger.info()
itemlist = []
- data = httptools.downloadpage(item.url).data
- realplot = ''
+ base_data = httptools.downloadpage(item.url).data
+ base_data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", base_data)
+ thumbnail = ''
if item.extra == 'letras':
- patron = '
([^<]+)<\/p> ') - plot = scrapertools.remove_htmltags(realplot) action = 'temporadas' else: if scrapedtitle.lower() in thumbletras: thumbnail = thumbletras[scrapedtitle.lower()] - else: - thumbnail = '' - plot = '' action = 'todas' title = scrapedtitle.replace(': ', '') 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