From f372c834f19f0f38faeda075bf65f66d54f7dd61 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sun, 19 Jan 2020 10:50:44 +0100 Subject: [PATCH 1/8] Fix Animeunity e Dreamsub: N.B. se Dreamsub non funziona cancellare le 2 righe: quality e servers relative a dreamsub nel file addon_data/plugin.video.kod/settings_channels/autoplay_data.json --- channels/animeunity.py | 7 ++++--- core/support.py | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/channels/animeunity.py b/channels/animeunity.py index cced6c5a..09a628ad 100644 --- a/channels/animeunity.py +++ b/channels/animeunity.py @@ -86,10 +86,11 @@ def peliculas(item): @support.scrape def episodios(item): + # debug = True data = item.data anime = True pagination = 50 - patron = r'(?P\d+)' + patron = r'(?P\d+)' def itemHook(item): item.title = item.title + support.typo(item.fulltitle,'-- bold') return item @@ -99,14 +100,14 @@ def episodios(item): def findvideos(item): support.log() html = support.match(item, patron=r'TIPO:\s*\s*([A-Za-z]+)') - if html.match == 'TV': + if html.match == 'TV' and item.contentType != 'episode': item.contentType = 'tvshow' item.data = html.data return episodios(item) else: itemlist = [] + if item.contentType != 'episode': item.contentType = 'movie' video = support.match(html.data, patron=r' Date: Sun, 19 Jan 2020 11:38:02 +0100 Subject: [PATCH 2/8] Fix Animepertutti --- channels/animeleggendari.py | 8 ++++---- servers/mixdrop.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/channels/animeleggendari.py b/channels/animeleggendari.py index 3e814de3..a26e8314 100644 --- a/channels/animeleggendari.py +++ b/channels/animeleggendari.py @@ -74,10 +74,10 @@ def peliculas(item): @support.scrape def episodios(item): - data = support.match(item, headers=headers).data - if not any(x in data for x in ['Lista Episodi', 'Movie Parte']): + data = support.match(item, headers=headers, patronBlock=r'entry-content clearfix">(.*?)class="mh-widget mh-posts-2 widget_text').block + if not 'pagination clearfix' in data: support.log('NOT IN DATA') - patron = r'(?:iframe src|str)="(?P[^"]+)"' + patron = r'[^"]+)"' title = item.title def fullItemlistHook(itemlist): url = '' @@ -120,7 +120,7 @@ def findvideos(item): if item.data: data = item.data else: - matches = support.match(item, patron=r'(?:str="([^"]+)"|iframe src="([^"]+)")').matches + matches = support.match(item, patron=r'[^"]+)"').matches data = '' if matches: for match in matches: diff --git a/servers/mixdrop.json b/servers/mixdrop.json index 6d39077a..6977131e 100644 --- a/servers/mixdrop.json +++ b/servers/mixdrop.json @@ -4,7 +4,7 @@ "ignore_urls": [], "patterns": [ { - "pattern": "mixdrop.co/(?:f|e)/([a-z0-9]+)", + "pattern": "mixdrop.[^/]+/(?:f|e)/([a-z0-9]+)", "url": "https://mixdrop.co/e/\\1" } ] From 9c7a015397fafb68a948ac3a9b6aca47b8cd8280 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 19 Jan 2020 19:50:36 +0100 Subject: [PATCH 3/8] fix resolverdns (alcuni siti non andranno con versioni vecchie di kodi) --- specials/resolverdns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specials/resolverdns.py b/specials/resolverdns.py index eda5ce06..ec244237 100644 --- a/specials/resolverdns.py +++ b/specials/resolverdns.py @@ -40,7 +40,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter): def __init__(self, domain, CF=False, *args, **kwargs): self.conn = sql.connect(db) self.cur = self.conn.cursor() - self.ssl_context = CustomContext(ssl.PROTOCOL_SSLv23, domain) + self.ssl_context = CustomContext(ssl.PROTOCOL_TLS if 'PROTOCOL_TLS' in ssl.__dict__ else ssl.PROTOCOL_SSLv3, domain) self.CF = CF # if cloudscrape is in action self.cipherSuite = kwargs.pop('cipherSuite', ssl._DEFAULT_CIPHERS) @@ -99,7 +99,7 @@ class CipherSuiteAdapter(host_header_ssl.HostHeaderSSLAdapter): domain = parse.netloc else: raise requests.exceptions.URLRequired - self.ssl_context = CustomContext(ssl.PROTOCOL_SSLv23, domain) + self.ssl_context = CustomContext(ssl.PROTOCOL_TLS if 'PROTOCOL_TLS' in ssl.__dict__ else ssl.PROTOCOL_SSLv3, domain) if self.CF: self.ssl_context.options |= (ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1) self.ssl_context.set_ciphers(self.cipherSuite) From 3dc81cf9b02a5e0572bd901c8c7e62cf5b9c493b Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 19 Jan 2020 20:20:02 +0100 Subject: [PATCH 4/8] fix wstream --- servers/wstream.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servers/wstream.py b/servers/wstream.py index 403af338..f903e8b7 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -11,16 +11,17 @@ headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20 def test_video_exists(page_url): logger.info("(page_url='%s')" % page_url) + resp = httptools.downloadpage(page_url) global data - data = httptools.downloadpage(page_url).data + data = resp.data + page_url = resp.url if '/streaming.php' in page_url in page_url: code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1].replace('.html','') logger.info('WCODE='+code) page_url = 'https://wstream.video/video.php?file_code=' + code data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data - code = page_url.split('=')[-1] - ID = scrapertools.find_single_match(data, r'''input\D*id=(?:'|")([^'"]+)(?:'|")''') + ID, code = scrapertools.find_single_match(data, r"""input\D*id=(?:'|")([^'"]+)(?:'|").*?value='([a-z0-9]+)""") post = urllib.urlencode({ID: code}) data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data From 17f8d9e203cf1aba10d6c6da3179270600bf63d9 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 19 Jan 2020 21:14:16 +0100 Subject: [PATCH 5/8] fix netfreex --- channels.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels.json b/channels.json index 8258dba7..3f9214aa 100644 --- a/channels.json +++ b/channels.json @@ -27,7 +27,7 @@ "ilgeniodellostreaming": "https://igds.one", "italiaserie": "https://italiaserie.org", "mondoserietv": "https://mondoserietv.com", - "netfreex": "https://www.netfreex.online", + "netfreex": "https://www.netfreex.icu", "piratestreaming": "https://www.piratestreaming.gratis", "polpotv": "https://polpo.tv", "pufimovies": "https://pufimovies.com", From 55d615393e3a39ff1b73937b559b1eace6803c39 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Sun, 19 Jan 2020 21:50:45 +0100 Subject: [PATCH 6/8] Fix EP. Succ. --- specials/nextep.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specials/nextep.py b/specials/nextep.py index e69a4600..e2403011 100644 --- a/specials/nextep.py +++ b/specials/nextep.py @@ -77,6 +77,8 @@ def next_ep(item): if file.endswith('.strm'): fileList.append(file) + fileList.sort() + nextIndex = fileList.index(current_filename) + 1 if nextIndex == 0 or nextIndex == len(fileList): next_file = None From 93d186ad42a9cf2a055591e1ca464df602dc8b81 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 20 Jan 2020 18:31:26 +0100 Subject: [PATCH 7/8] KoD 0.7.1 --- addon.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addon.xml b/addon.xml index aee17aff..ba3830e1 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -20,9 +20,10 @@ resources/media/themes/ss/2.png resources/media/themes/ss/3.png - - nuovo metodo di override DNS -- aggiunta opzione nascondi server, se usi l'autoplay -- migliorie al codice e fix vari + - A grande richiesta, è ora possibile riprodurre in automatico l'episodio successivo di una serie in libreria +- aggiunta la possibilità di nascondere la lista dei server, quando si usa l'autoplay +- aggiunto canale pufimovies.com +- fix vari Naviga velocemente sul web e guarda i contenuti presenti [COLOR red]The owners and submitters to this addon do not host or distribute any of the content displayed by these addons nor do they have any affiliation with the content providers.[/COLOR] [COLOR yellow]Kodi © is a registered trademark of the XBMC Foundation. We are not connected to or in any other way affiliated with Kodi, Team Kodi, or the XBMC Foundation. Furthermore, any software, addons, or products offered by us will receive no support in official Kodi channels, including the Kodi forums and various social networks.[/COLOR] From d4f83a97bb4eef0cb9893fad543f41b30dd52662 Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 20 Jan 2020 19:30:55 +0100 Subject: [PATCH 8/8] fix cb01 -> sezione film (causa oscar..) --- channels/cineblog01.py | 2 +- core/scrapertools.py | 27 +++------------------------ 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 64a82ac5..82889be8 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -131,7 +131,7 @@ def peliculas(item): # esclusione degli articoli 'di servizio' blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', 'Aggiornamento Quotidiano Serie TV', 'OSCAR 2019 ▶ CB01.UNO: Vota il tuo film preferito! 🎬', - 'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?'] + 'Openload: la situazione. Benvenuto Verystream', 'Openload: lo volete ancora?', 'OSCAR 2020 ▶ VOTA IL TUO FILM PREFERITO! 🎬'] # debug = True if 'newest' in item.args: if '/serietv/' not in item.url: diff --git a/core/scrapertools.py b/core/scrapertools.py index 5bb50a7b..5b6d4bac 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -39,30 +39,9 @@ def find_multiple_matches_groups(text, pattern): # Convierte los codigos html "ñ" y lo reemplaza por "ñ" caracter unicode utf-8 def decodeHtmlentities(data): - entity_re = re.compile("&(#?)(\d{1,5}|\w{1,8})(;?)") - - def substitute_entity(match): - ent = match.group(2) + match.group(3) - res = "" - while not ent in html5 and not ent.endswith(";") and match.group(1) != "#": - # Excepción para cuando '&' se usa como argumento en la urls contenidas en los datos - try: - res = ent[-1] + res - ent = ent[:-1] - except: - break - - if match.group(1) == "#": - ent = unichr(int(ent.replace(";", ""))) - return ent.encode('utf-8') - else: - cp = html5.get(ent) - if cp: - return cp.decode("unicode-escape").encode('utf-8') + res - else: - return match.group() - - return entity_re.subn(substitute_entity, data)[0] + import HTMLParser + parser = HTMLParser.HTMLParser() + return parser.unescape(data) def unescape(text):