From d2884c0f447b1172bc620dc6edd3e213f103de18 Mon Sep 17 00:00:00 2001 From: greko17 Date: Wed, 2 Oct 2019 22:36:09 +0200 Subject: [PATCH 1/6] fix: altadefinizione01.py ultime modifiche. canale da testare! --- channels/altadefinizione01_link.json | 2 +- channels/altadefinizione01_link.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/altadefinizione01_link.json b/channels/altadefinizione01_link.json index 069acd32..068a1ee4 100644 --- a/channels/altadefinizione01_link.json +++ b/channels/altadefinizione01_link.json @@ -3,7 +3,7 @@ "name": "Altadefinizione01 L", "active": true, "adult": false, - "language": ["ita","vos"], + "language": ["ita","vosi"], "thumbnail": "altadefinizione01_L.png", "banner": "altadefinizione01_L.png", "categories": ["movie","vos"], diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py index 6882c649..cdf1dfc5 100644 --- a/channels/altadefinizione01_link.py +++ b/channels/altadefinizione01_link.py @@ -43,7 +43,7 @@ def peliculas(item): '[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\ '[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\ '[^>]+>[^>]+>[^>]+>[^>]+> (?P\d{4})[^>]+>[^>]+> (?P\d+)'\ - '[^>]+>[^>]+> (?P[a-zA-Z]+) [^>]+>[^>]+> (?P.*?) [^>]+>' + '[^>]+>[^>]+> (?P[a-zA-Z]+) [^>]+>[^>]+> (?P[^>]+) [^>]+>' patronNext = r'\d ' #debug = True return locals() From 213f6a6fec4ad936e638c2ac86c8443f98149cf3 Mon Sep 17 00:00:00 2001 From: greko17 Date: Wed, 2 Oct 2019 22:41:48 +0200 Subject: [PATCH 2/6] fix: altadefinizione01.py ultime modifiche. canale da testare --- channels/altadefinizione01.json | 4 ++-- channels/altadefinizione01.py | 40 ++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/channels/altadefinizione01.json b/channels/altadefinizione01.json index 927022e4..a8690559 100644 --- a/channels/altadefinizione01.json +++ b/channels/altadefinizione01.json @@ -1,11 +1,11 @@ { "id": "altadefinizione01", "name": "Altadefinizione01", - "language": ["ita", "vos"], + "language": ["ita", "vosi"], "active": true, "adult": false, "thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png", "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/altadefinizione01.png", - "categories": ["movie"], + "categories": ["movie", "vos"], "settings": [] } diff --git a/channels/altadefinizione01.py b/channels/altadefinizione01.py index 1bcba04a..f24e4b88 100644 --- a/channels/altadefinizione01.py +++ b/channels/altadefinizione01.py @@ -2,12 +2,17 @@ # ------------------------------------------------------------ # Canale per altadefinizione01 # ------------------------------------------------------------ +""" + + Eccezioni note che non superano il test del canale: + + Avvisi: + - L'url si prende da questo file. + - è presente nelle novità-> Film. + + Ulteriori info: """ - - -""" - from core import scrapertoolsV2, httptools, support from core.item import Item from platformcode import config, logger @@ -33,9 +38,9 @@ def mainlist(item): film = [ ('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']), ('Ultimi Aggiornati-Aggiunti', ['','peliculas', 'update']), - ('Generi', ['', 'categorie', 'genres']), - ('Lettera', ['/catalog/a/', 'categorie', 'orderalf']), - ('Anni', ['', 'categorie', 'years']), + ('Generi', ['', 'genres', 'genres']), + ('Lettera', ['/catalog/a/', 'genres', 'orderalf']), + ('Anni', ['', 'genres', 'years']), ('Sub-ITA', ['/sub-ita/', 'peliculas', 'pellicola']) ] @@ -44,7 +49,7 @@ def mainlist(item): @support.scrape def peliculas(item): support.log('peliculas',item) - deflang = 'ITA' +## deflang = 'ITA' action="findvideos" patron = r'

..*?<.*?src="(?P[^"]+)"'\ @@ -54,22 +59,20 @@ def peliculas(item): if item.args == "search": patronBlock = r'
(?P.*)
' + elif item.args == 'update': patronBlock = r'
Ultimi Film Aggiunti/Aggiornati
(?P.*?)
' - patron = r'style="background-image:url\((?P[^\)]+).+?

'\ - '(?P.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> '\ - '[^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>'\ - '(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)' + patron = r'style="background-image:url\((?P<thumb>[^\)]+).+?<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> [^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>.*?(?:>Film (?P<lang>Sub ITA)</a></p> )?<p>(?P<plot>[^<]+)<.*?href="(?P<url>[^"]+)' else: patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">' patronNext = '<span>\d</span> <a href="([^"]+)">' - #debug = True + debug = True return locals() @support.scrape -def categorie(item): - support.log('categorie',item) +def genres(item): + support.log('genres',item) if item.args != 'orderalf': action = "peliculas" else: action = 'orderalf' @@ -100,9 +103,6 @@ def orderalf(item): return locals() -def findvideos(item): - support.log('findvideos', item) - return support.server(item, headers=headers) def search(item, text): support.log(item, text) @@ -139,3 +139,7 @@ def newest(categoria): return [] return itemlist + +def findvideos(item): + support.log('findvideos', item) + return support.server(item, headers=headers) From b07844afa6ab17cba16393796982f6386ad29113 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Wed, 2 Oct 2019 22:52:58 +0200 Subject: [PATCH 3/6] fix: altadefinizione01_link.py canale ultimato. da testare --- channels/altadefinizione01_link.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/channels/altadefinizione01_link.py b/channels/altadefinizione01_link.py index cdf1dfc5..6950f524 100644 --- a/channels/altadefinizione01_link.py +++ b/channels/altadefinizione01_link.py @@ -1,6 +1,20 @@ # -*- coding: utf-8 -*- -# -*- Channel Altadefinizione01L Film -*- -# -*- By Greko -*- +# -*- Channel altadefinizione01_link -*- +""" + + Eccezioni che non superano il test del canale: + - indicare i problemile eccezioni + + Novità. Indicare in quale/i sezione/i è presente il canale: + -film + + Avvisi: + - la voce 'Mi sento fortunato' è il rettangolino in basso nel sito + con scritto 'FILM RANDOM' + + Ulteriori info: + +""" from core import support from core.item import Item From c0956eaa871fdb4cbb87985cf7dc61eb6035a0cc Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Thu, 3 Oct 2019 11:35:34 +0200 Subject: [PATCH 4/6] fix: altadefinizioneclick.py correzioni varie, aggiunti commenti per i beta-tester --- channels/altadefinizioneclick.json | 2 +- channels/altadefinizioneclick.py | 44 ++++++++++++++++++------------ 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/channels/altadefinizioneclick.json b/channels/altadefinizioneclick.json index 789b17a3..dbf3ca0a 100644 --- a/channels/altadefinizioneclick.json +++ b/channels/altadefinizioneclick.json @@ -3,7 +3,7 @@ "name": "AltadefinizioneClick", "active": true, "adult": false, - "language": ["ita","vos"], + "language": ["ita","vosi"], "thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/altadefinizioneclick.png", "bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/altadefinizioneciclk.png", "categories": ["movie","vos"], diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index 5a439d6a..8d7b4ba8 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -2,17 +2,32 @@ # ------------------------------------------------------------ # Canale per altadefinizioneclick # ---------------------------------------------------------- +""" -from core import servertools, support + Eccezioni che non superano il test del canale: + - indicare le eccezioni + + Novità. Indicare in quale/i sezione/i è presente il canale: + - film + + Avvisi: + - Eventuali avvisi per i tester + + Ulteriori info: + + +""" +from core import support from core.item import Item -from platformcode import config#, logger +from platformcode import config __channel__ = 'altadefinizioneclick' host = config.get_channel_url(__channel__) headers = [['Referer', host]] -list_servers = ['verystream', 'openload', 'streamango', "vidoza", "thevideo", "okru", 'youtube'] -list_quality = ['1080p'] +list_servers = ['verystream', 'rapidvideo', 'openload', 'streamango', 'vidoza', + 'vidcloud', 'thevideo', 'okru', 'hdload', 'youtube'] +list_quality = ['1080p', '720', '360'] @support.menu def mainlist(item): @@ -24,28 +39,21 @@ def mainlist(item): ('Anni', ['', 'genres', 'years']), ('Qualità', ['', 'genres', 'quality']), ('Mi sento Fortunato',[ '', 'genres', 'lucky']), - ('Sub-ITA', ['/sub-ita/', 'peliculas', 'vos']) + ('Sub-ITA', ['/sub-ita/', 'peliculas', 'sub']) ] return locals() @support.scrape def peliculas(item): support.log() - #debug = True + patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">(?P<quality>[^<>]+))?.+?'\ 'href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>'\ '(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ '(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )' - patronBlock = r'<h1 class="titleSection titleLastIns">(?P<block>.*?)<div class="row ismobile">' + patronBlock = r'<h1 class="titleSection titleLastIns">.+?</h1>(?P<block>.*?)<div class="row ismobile">' - if item.args == 'news': - patronBlock = r'Nuove uscite</h1>(?P<block>.*?)<div class="row ismobile">' - elif item.args == 'cinema': - patronBlock = r'<h1 class="titleSection titleLastIns">Al cinema</h1>(?P<block>.*?)<div class="row ismobile">' - elif item.args == 'vos': - patronBlock = r'<h1 class="titleSection titleLastIns">SUB-ITA</h1>(?P<block>.*?)<div class="row ismobile">' - elif item.args == 'genres': - patronBlock = '<h1 class="titleSection titleLastIns">(?P<block>.*?)<div class="row ismobile">' + if item.args == 'genres': patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">'\ '(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)"'\ '.+?<h2 class="titleFilm(?:Mobile)?">[^>]+>(?P<title>.+?)[ ]?'\ @@ -56,12 +64,13 @@ def peliculas(item): patron = r'<a href="(?P<url>[^"]+)">\s*<div class="wrapperImage">(?:<span class="hd">(?P<quality>[^<]+)'\ '<\/span>)?<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<[^<]+>'\ '(?:.*?IMDB:\s(\2[^<]+)<\/div>)?' - else: + elif not item.args: patronBlock = r'ULTIMI INSERITI(?P<block>.*?)<div class="sliderLastUpdate ismobile ">' - # in caso di CERCA si apre la maschera di inserimento dati + # nella pagina "CERCA", la voce "SUCCESSIVO" apre la maschera di inserimento dati patronNext = r'<a class="next page-numbers" href="([^"]+)">' + #debug = True return locals() @support.scrape @@ -107,6 +116,7 @@ def newest(categoria): item = Item() try: if categoria == "peliculas": + item.args = 'news' item.url = host + "/nuove-uscite/" item.action = "peliculas" itemlist = peliculas(item) From e2046ebd3e22f47c2d20f54364569ebc80d91ef1 Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Thu, 3 Oct 2019 11:50:25 +0200 Subject: [PATCH 5/6] fix: casacinemaInfo.py canale da testare --- channels/casacinemaInfo.json | 4 ++-- channels/casacinemaInfo.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/channels/casacinemaInfo.json b/channels/casacinemaInfo.json index 3a5ef7b4..ff6d339b 100644 --- a/channels/casacinemaInfo.json +++ b/channels/casacinemaInfo.json @@ -1,11 +1,11 @@ { "id": "casacinemaInfo", - "name": "La casa del cinema", + "name": "La Casa del Cinema", "language": ["ita", "vosi"], "active": true, "adult": false, "thumbnail": "", "banner": "", - "categories": ["movie"], + "categories": ["movie", "vos"], "settings": [] } diff --git a/channels/casacinemaInfo.py b/channels/casacinemaInfo.py index 01981d45..3a4e88f3 100644 --- a/channels/casacinemaInfo.py +++ b/channels/casacinemaInfo.py @@ -5,12 +5,14 @@ """ Problemi noti che non superano il test del canale: - - indicare i problemi + - Avvisi: - Sub-ita è nel titolo, lascia il puntatore sulla locandina per visualizzare il titolo completo! + Novità: + - Film Ulteriori info: @@ -25,7 +27,7 @@ from core import support # in caso di necessità -from core import scrapertoolsV2, httptools #, servertools, tmdb +from core import scrapertoolsV2, httptools from core.item import Item #from lib import unshortenit @@ -55,8 +57,6 @@ def mainlist(item): # Ordine delle voci # Voce FILM, puoi solo impostare l'url film = ['', - #'url', # url per la voce FILM, se possibile la pagina principale con le ultime novità - #Voce Menu,['url','action','args',contentType] ('Al Cinema', ['/category/in-sala/', 'peliculas', '']), ('Novità', ['/category/nuove-uscite/', 'peliculas', '']), ('Generi', ['', 'genres', 'genres']), @@ -95,7 +95,7 @@ def genres(item): patron = r'href="(?P<url>[^"]+)">(?P<title>[^<]+)<' patronBlock = r'</span>Generi</h3>(?P<block>.*?)<div class="clear"></div>' - debug = False +## debug = True return locals() From 317557903a80a6a3e475e71e2d5c467151b00a5b Mon Sep 17 00:00:00 2001 From: greko17 <sex1712@email.it> Date: Thu, 3 Oct 2019 18:44:09 +0200 Subject: [PATCH 6/6] fix: casacinema.py canale da testare --- channels/casacinema.json | 8 ----- channels/casacinema.py | 72 ++++++++++++++++++++++++++++++++-------- 2 files changed, 59 insertions(+), 21 deletions(-) diff --git a/channels/casacinema.json b/channels/casacinema.json index 6141f268..ee2514ad 100644 --- a/channels/casacinema.json +++ b/channels/casacinema.json @@ -8,13 +8,5 @@ "banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png", "categories": ["tvshow", "movie","vos"], "settings": [ - { - "id": "include_in_global_search", - "type": "bool", - "label": "@70728", - "default": false, - "enabled": false, - "visible": false - } ] } diff --git a/channels/casacinema.py b/channels/casacinema.py index 7a64bd4e..9c117ca1 100644 --- a/channels/casacinema.py +++ b/channels/casacinema.py @@ -2,28 +2,27 @@ # ------------------------------------------------------------ # Canale per 'casacinema' # ------------------------------------------------------------ - """ Problemi noti che non superano il test del canale: - indicare i problemi Avvisi: - - NON è presente nella ricerca globale - - TUTTE le pagine delle serie contengono al max 20 titoli + - + Novità: + - Film, SerieTv Ulteriori info: """ -# Qui gli import -# per l'uso dei decoratori, per i log, e funzioni per siti particolari +import re from core import support from platformcode import config # in caso di necessità -#from core import scrapertoolsV2#, httptools, servertools, tmdb -from core.item import Item # per newest -#from lib import unshortenit +from core import scrapertoolsV2, httptools#, servertools, tmdb +from core.item import Item + ##### fine import __channel__ = "casacinema" @@ -45,6 +44,9 @@ def mainlist(item): tvshow = ['/aggiornamenti-serie-tv', ('Ultime', ['/category/serie-tv', 'peliculas', '']), ] + + search = '' + return locals() @support.scrape @@ -54,9 +56,12 @@ def peliculas(item): if item.contentType == 'movie': action = 'findvideos' - else: + if item.contentType == 'tvshow': action = 'episodios' pagination = '' + else: + # è una ricerca + action = 'select' blacklist = [''] patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>.*?)[ ]?(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?' @@ -79,10 +84,12 @@ def peliculas(item): def episodios(item): support.log(item) #dbg - + if item.data1: + data = item.data1 action = 'findvideos' + item.contentType = 'tvshow' blacklist = [''] - patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)' + patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(?P<title>[^<]+)<(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:<br />|</p>)' patronBlock = r'<strong>(?P<block>(?:.+?Stagione*.+?(?P<lang>ITA|Sub-ITA))?(?:.+?|</strong>)(/?:</span>)?</p>.*?</p>)' ## debug = True @@ -103,6 +110,36 @@ def genres(item): #debug = True return locals() +def select(item): + support.log('select --->', item) + debug = True + #support.dbg() + data = httptools.downloadpage(item.url, headers=headers).data + data = re.sub('\n|\t', ' ', data) + data = re.sub(r'>\s+<', '> <', data) + if 'continua con il video' in data.lower(): +## block = scrapertoolsV2.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)<div style="margin-left: 0.5%; color: #FFF;">') +## if re.findall('rel="category tag">serie', data, re.IGNORECASE): + support.log('select = ### è un film ###') + return findvideos(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + #args='serie', + contentType='movie', + data1 = data + )) + else: + support.log('select = ### è una serie ###') + return episodios(Item(channel=item.channel, + title=item.title, + fulltitle=item.fulltitle, + url=item.url, + #args='serie', + contentType='tvshow', + data1 = data + )) + ############## Fondo Pagina def search(item, text): @@ -111,7 +148,7 @@ def search(item, text): text = text.replace(' ', '+') item.url = host + '/?s=' + text item.args = 'search' - item.contentType = item.contentType + item.contentType = 'episode' # non fa uscire le voci nel context menu try: return peliculas(item) # Se captura la excepcion, para no interrumpir al buscador global si un canal falla @@ -133,6 +170,7 @@ def newest(categoria): else: item.contentType = 'movie' item.url = host+'/category/film' + item.action = 'peliculas' itemlist = peliculas(item) @@ -149,7 +187,15 @@ def newest(categoria): def findvideos(item): support.log('findvideos ->', item) + itemlist = [] if item.contentType != 'movie': return support.server(item, item.url) else: - return support.server(item) + block = r'<div class="col-md-10">(.+?)<div class="swappable" id="links">' + patron = r'SRC="([^"]+)"' + links = re.findall(patron, block, re.IGNORECASE) + if "#" in links: + links = link.replace('#', 'speedvideo.net') + return support.server(item, links) + else: + return support.server(item)