From 03bcd7421e74cf9f463fcd8b62cc3869bdd94bf3 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Fri, 22 Mar 2019 19:05:12 +0100 Subject: [PATCH] CB01 Fix with Auto Thumb --- plugin.video.alfa/channels/cineblog01.py | 73 ++++++++++++------------ 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/plugin.video.alfa/channels/cineblog01.py b/plugin.video.alfa/channels/cineblog01.py index 9053a935..433500c4 100644 --- a/plugin.video.alfa/channels/cineblog01.py +++ b/plugin.video.alfa/channels/cineblog01.py @@ -11,6 +11,7 @@ from core import scrapertoolsV2, httptools, servertools, tmdb from core.item import Item from lib import unshortenit from platformcode import logger, config +from channelselector import thumb #impostati dinamicamente da getUrl() host = "" @@ -42,74 +43,66 @@ def mainlist(item): action="video", title="[B]Film[/B]", url=host, - contentType="movie", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="movie"), Item(channel=item.channel, action="menu", - title="[B] > MenĂ¹ HD[/B]", + title="[B] > Film HD[/B]", extra='Film HD Streaming', url=host, - contentType="movie", - thumbnail="http://jcrent.com/apple%20tv%20final/HD.png"), + contentType="movie"), Item(channel=item.channel, action="menu", title="[B] > Film per Genere[/B]", extra='Film per Genere', url=host, - contentType="movie", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="movie"), Item(channel=item.channel, action="menu", title="[B] > Film per Anno[/B]", extra='Film per Anno', url=host, - contentType="movie", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="movie"), Item(channel=item.channel, action="search", title="[COLOR blue] > Cerca Film[/COLOR]", contentType="movie", - url=host, - thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"), + url=host,), Item(channel=item.channel, action="video", title="[B]Serie TV[/B]", url=host + '/serietv/', - contentType="episode", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="episode"), Item(channel=item.channel, action="menu", title="[B] > Serie-Tv per Lettera[/B]", extra='Serie-Tv per Lettera', url=host + '/serietv/', - contentType="episode", - thumbnail="http://jcrent.com/apple%20tv%20final/HD.png"), + contentType="episode"), Item(channel=item.channel, action="menu", title="[B] > Serie-Tv per Genere[/B]", extra='Serie-Tv per Genere', url=host + '/serietv/', - contentType="episode", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="episode"), Item(channel=item.channel, action="menu", title="[B] > Serie-Tv per Anno[/B]", extra='Serie-Tv per Anno', url=host + '/serietv/', - contentType="episode", - thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"), + contentType="episode"), Item(channel=item.channel, action="search", title="[COLOR blue] > Cerca Serie TV[/COLOR]", contentType="episode", - url=host + '/serietv/', - thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"), - + url=host + '/serietv/'), ] - + autoplay.show_option(item.channel, itemlist) + # auto thumb + itemlist=thumb(itemlist) + return itemlist def menu(item): @@ -117,7 +110,8 @@ def menu(item): data = httptools.downloadpage(item.url, headers=headers).data data = re.sub('\n|\t','',data) block = scrapertoolsV2.get_match(data, item.extra + r'<\/span>.*?(.*?)<\/ul>') - patron = r'href="([^"]+)">(.*?)<\/a>' + logger.info('MENU BLOCK= '+block) + patron = r'href=([^>]+)>(.*?)<\/a>' matches = re.compile(patron, re.DOTALL).findall(block) for scrapedurl, scrapedtitle in matches: itemlist.append( @@ -186,12 +180,14 @@ def video(item): data = httptools.downloadpage(item.url, headers=headers).data data = re.sub('\n|\t','',data) - block = scrapertoolsV2.get_match(data, r'
(.*?)