From 88b519216f29bc6fd984ef7eda5664f76c331d8e Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Tue, 2 Apr 2019 16:02:20 +0200 Subject: [PATCH] Fix CB01 --- plugin.video.alfa/channels/cineblog01.py | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/plugin.video.alfa/channels/cineblog01.py b/plugin.video.alfa/channels/cineblog01.py index 23e06e00..6814e4ce 100644 --- a/plugin.video.alfa/channels/cineblog01.py +++ b/plugin.video.alfa/channels/cineblog01.py @@ -33,7 +33,7 @@ blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’ def mainlist(item): - logger.info("[cineblog01.py] mainlist") + support.log() autoplay.init(item.channel, list_servers, list_quality) @@ -43,13 +43,13 @@ def mainlist(item): support.menu(itemlist, 'HD submenu', 'menu', host, args="Film HD Streaming") support.menu(itemlist, 'Per genere submenu', 'menu', host, args="Film per Genere") support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno") - support.menu(itemlist, 'Cerca submenu color blue', 'search', host) + support.menu(itemlist, 'Cerca Film... submenu color blue', 'search', host) support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode') support.menu(itemlist, 'Per lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera") support.menu(itemlist, 'Per genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere") support.menu(itemlist, 'Per Anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno") - support.menu(itemlist, 'Cerca submenu color blue', 'search', host + '/serietv/', contentType='episode') + support.menu(itemlist, 'Cerca Serie TV... submenu color blue', 'search', host + '/serietv/', contentType='episode') autoplay.show_option(item.channel, itemlist) @@ -61,7 +61,7 @@ def menu(item): data = httptools.downloadpage(item.url, headers=headers).data data = re.sub('\n|\t', '', data) block = scrapertoolsV2.get_match(data, item.args + r'<\/span>.*?(.*?)<\/ul>') - logger.info('MENU BLOCK= '+block) + support.log('MENU BLOCK= ',block) patron = r'href="?([^">]+)"?>(.*?)<\/a>' matches = re.compile(patron, re.DOTALL).findall(block) for scrapedurl, scrapedtitle in matches: @@ -78,7 +78,7 @@ def menu(item): def search(item, text): - logger.info("[cineblog01.py] " + item.url + " search " + text) + support.log(item.url, "search" ,text) try: item.url = item.url + "/?s=" + text @@ -93,7 +93,7 @@ def search(item, text): def newest(categoria): - logger.info("[cineblog01.py] newest") + support.log() itemlist = [] item = Item() item.url = host + '/lista-film-ultimi-100-film-aggiunti/' @@ -103,13 +103,13 @@ def newest(categoria): def peliculas(item): - logger.info("[cineblog01.py] peliculas") + support.log() if item.contentType == 'movie' or '/serietv/' not in item.url: patron = r'
.*?]+)\/>([^<[(]+)(?:\[([A-Za-z0-9/-]+)])? (?:\(([0-9]{4})\))?.*?([^<>]+)DURATA ([0-9]+).*?
([^<>]+)' listGroups = ['thumb', 'url', 'title', 'quality', 'year', 'genre', 'duration', 'plot'] action = 'findvideos' else: - patron = r'div class="card-image">.*?([^<[(]+).*?([^<>0-9(]+)\(([0-9]{4}).*?

([^<>]+)' + patron = r'div class="card-image">.*?([^<[(]+)<\/a>.*?([^<>0-9(]+)\(([0-9]{4}).*?<\/(p|div)>([^<>]+)' listGroups = ['thumb', 'url', 'title', 'genre', 'year', 'plot'] action = 'episodios' @@ -120,7 +120,7 @@ def peliculas(item): def episodios(item): - logger.info("[cineblog01.py] episodios") + support.log() return support.scrape(item, patron_block=[r'
(.*?)<\/article>', r'
[^<>]*?
(.*?)
\[riduci\]
'], patron='(?:

)?([0-9]+×[0-9]+)(.*?)(?:

|]+>([^<]+)<' + support.log('STREAMING=',streaming) + patron = ']+>([^<]+)<' matches = re.compile(patron, re.DOTALL).findall(streaming) for scrapedurl, scrapedtitle in matches: logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, scrapedurl, scrapedtitle)) @@ -151,13 +151,13 @@ def findvideos(item): contentType=item.contentType, folder=False)) - logger.info("[cineblog01.py] findvid_film") + support.log() itemlist = [] # Carica la pagina data = httptools.downloadpage(item.url).data - logger.info("DATA= "+data) + data = re.sub('\n|\t','',data) # Extract the quality format patronvideos = '>([^<]+)
' @@ -167,21 +167,21 @@ def findvideos(item): QualityStr = scrapertoolsV2.decodeHtmlentities(match.group(1))[6:] # Estrae i contenuti - Streaming - load_links(itemlist, 'Streaming:(.*?)', "orange", "Streaming", "SD") + load_links(itemlist, 'Streaming:(.*?)', "orange", "Streaming", "SD") # Estrae i contenuti - Streaming HD - load_links(itemlist, 'Streaming HD[^<]+(.*?)
', "yellow", "Streaming HD", "HD") + load_links(itemlist, 'Streaming HD[^<]+(.*?)', "yellow", "Streaming HD", "HD") autoplay.start(itemlist, item) # Estrae i contenuti - Streaming 3D - load_links(itemlist, 'Streaming 3D[^<]+(.*?)
', "pink", "Streaming 3D") + load_links(itemlist, 'Streaming 3D[^<]+(.*?)', "pink", "Streaming 3D") # Estrae i contenuti - Download - load_links(itemlist, 'Download:(.*?)
', "aqua", "Download") + load_links(itemlist, 'Download:(.*?)', "aqua", "Download") # Estrae i contenuti - Download HD - load_links(itemlist, 'Download HD[^<]+(.*?)
', "azure", + load_links(itemlist, 'Download HD[^<]+(.*?)', "azure", "Download HD") if len(itemlist) == 0: @@ -225,7 +225,7 @@ def findvid_serie(item): contentType=item.contentType, folder=False)) - logger.info("[cineblog01.py] findvid_serie") + support.log() itemlist = [] lnkblk = [] @@ -266,12 +266,12 @@ def findvid_serie(item): return itemlist def play(item): - logger.info("[cineblog01.py] play") + support.log() itemlist = [] ### Handling new cb01 wrapper if host[9:] + "/film/" in item.url: iurl = httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location", "") - logger.info("/film/ wrapper: %s" % iurl) + support.log("/film/ wrapper: ", iurl) if iurl: item.url = iurl