diff --git a/plugin.video.alfa/channels/filmsenzalimiti.py b/plugin.video.alfa/channels/filmsenzalimiti.py index 7f7e5eb7..69ddd340 100644 --- a/plugin.video.alfa/channels/filmsenzalimiti.py +++ b/plugin.video.alfa/channels/filmsenzalimiti.py @@ -120,37 +120,10 @@ def video(item): logger.info('[filmsenzalimiti.py] video') itemlist = [] - data = httptools.downloadpage(item.url).data.replace('\t','').replace('\n','') - logger.info('[filmsenzalimiti.py] video' +data) - patron = '
.*?.*?(.*?)<.*? len(match): # to fix a bug + match = list(match) + match.extend([''] * (len(listGroups)-len(match))) - title = scrapertoolsV2.decodeHtmlentities(scrapedtitle) - plot = scrapertoolsV2.decodeHtmlentities(scrapedplot) - if scrapedquality: - longtitle = '[B]' + title + '[/B] [COLOR blue][' + scrapedquality + '][/COLOR]' - else: - longtitle = '[B]' + title + '[/B]' + scrapedurl = url_host+match[listGroups.index('url')] if 'url' in listGroups else '' + scrapedtitle = match[listGroups.index('title')] if 'title' in listGroups else '' + scrapedthumb = match[listGroups.index('thumb')] if 'thumb' in listGroups else '' + scrapedquality = match[listGroups.index('quality')] if 'quality' in listGroups else '' + scrapedyear = match[listGroups.index('year')] if 'year' in listGroups else '' + scrapedplot = match[listGroups.index('plot')] if 'plot' in listGroups else '' + scrapedduration = match[listGroups.index('duration')] if 'duration' in listGroups else '' + scrapedgenre = match[listGroups.index('genre')] if 'genre' in listGroups else '' + scrapedrating = match[listGroups.index('rating')] if 'rating' in listGroups else '' - infolabels = {} - if scrapedyear: - infolabels['year'] = scrapedyear - if scrapedplot: - infolabels['plot'] = plot - if scrapedduration: - infolabels['duration'] = scrapedduration - if scrapedgenre: - infolabels['genre'] = scrapertoolsV2.find_multiple_matches(scrapedgenre, '(?:<[^<]+?>)?([^<>]+)') # delete all html tags and match text - if not scrapedtitle in blacklist: - itemlist.append( - Item(channel=item.channel, - action=action, - contentType=item.contentType, - title=longtitle, - fulltitle=title, - show=title, - quality=scrapedquality, - url=scrapedurl, - infoLabels=infolabels, - thumbnail=scrapedthumb - ) - ) + title = scrapertoolsV2.decodeHtmlentities(scrapedtitle) + plot = scrapertoolsV2.decodeHtmlentities(scrapedplot) + if scrapedquality: + longtitle = '[B]' + title + '[/B] [COLOR blue][' + scrapedquality + '][/COLOR]' + else: + longtitle = '[B]' + title + '[/B]' - tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) + infolabels = {} + if scrapedyear: + infolabels['year'] = scrapedyear + if scrapedplot: + infolabels['plot'] = plot + if scrapedduration: + infolabels['duration'] = scrapedduration + if scrapedgenre: + infolabels['genre'] = scrapertoolsV2.find_multiple_matches(scrapedgenre, '(?:<[^<]+?>)?([^<>]+)') # delete all html tags and match text + if scrapedrating: + infolabels['rating'] = scrapertoolsV2.decodeHtmlentities(scrapedrating) + if not scrapedtitle in blacklist: + itemlist.append( + Item(channel=item.channel, + action=action, + contentType=item.contentType, + title=longtitle, + fulltitle=title, + show=title, + quality=scrapedquality, + url=scrapedurl, + infoLabels=infolabels, + thumbnail=scrapedthumb + ) + ) - if patronNext: - next_page = scrapertoolsV2.find_single_match(data, patronNext) - logger.info('NEXT ' + next_page) + tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) - if next_page != "": - itemlist.append( - Item(channel=item.channel, - action="peliculas", - contentType=item.contentType, - title="[COLOR blue]" + config.get_localized_string(30992) + " >[/COLOR]", - url=next_page)) + if patronNext: + next_page = scrapertoolsV2.find_single_match(data, patronNext) + logger.info('NEXT ' + next_page) - return block + if next_page != "": + itemlist.append( + Item(channel=item.channel, + action="peliculas", + contentType=item.contentType, + title="[COLOR blue]" + config.get_localized_string(30992) + " >[/COLOR]", + url=next_page)) + + return itemlist def dooplay_get_links(item, host): @@ -201,16 +221,16 @@ def dooplay_get_links(item, host): return ret -def dooplay_films(item, itemlist, blacklist=""): +def dooplay_films(item, blacklist=""): patron = '
.*?([^<>]+).*?([^<>]+) (?:([0-9]{4}))?.*?(?:([0-9]+) min)?.*?(?:
([^<>]+).*?)?(?:genres">(.*?)
)?' patronNext = '