From 0b862726353ded39fa8edc1ee0a062f204bf3cf6 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sat, 2 Oct 2021 12:18:14 +0200 Subject: [PATCH] Disattivato altadefinizioneclick (unito al community), fix altacomm e cineblog per certi tipi di serie --- channels.json | 3 +-- channels/altadefinizioneclick.json | 2 +- channels/altadefinizionecommunity.py | 17 +++++++++++------ channels/cineblog01.py | 26 +++++++++++++------------- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/channels.json b/channels.json index 3f78cb2a..c242f753 100644 --- a/channels.json +++ b/channels.json @@ -45,8 +45,7 @@ "vvvvid": "https://www.vvvvid.it" }, "findhost": { - "altadefinizioneclick": "https://altadefinizione-nuovo.click", - "altadefinizionecommunity": "https://altaregistrazione.net", + "altadefinizionecommunity": "https://altadefinizione-nuovo.click", "animealtadefinizione": "https://www.animealtadefinizione.it", "filmpertutti": "https://filmpertuttiii.nuovo.live", "streamingcommunity": "https://streamingcommunity-nuovo.link" diff --git a/channels/altadefinizioneclick.json b/channels/altadefinizioneclick.json index b0c115d9..7f154537 100644 --- a/channels/altadefinizioneclick.json +++ b/channels/altadefinizioneclick.json @@ -1,7 +1,7 @@ { "id": "altadefinizioneclick", "name": "AltadefinizioneClick", - "active": true, + "active": false, "language": ["ita","sub-ita"], "thumbnail": "altadefinizioneclick.png", "bannermenu": "altadefinizioneciclk.png", diff --git a/channels/altadefinizionecommunity.py b/channels/altadefinizionecommunity.py index 49740139..5fc0934c 100644 --- a/channels/altadefinizionecommunity.py +++ b/channels/altadefinizionecommunity.py @@ -8,12 +8,17 @@ from platformcode import config, platformtools, logger from core import scrapertools, httptools +# def findhost(url): +# global register_url +# register_url = url +# return support.match(url, patron=r'Accedi').match def findhost(url): - global register_url - register_url = url - return support.match(url, patron=r'Accedi').match + return support.match(url, patron=r'
\s*\s*[^>]+>(?P\d+)(?:[^>]+>){2}(?P[^<]+)(?:[^>]+>){4}\s*]+>){3}(?P[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?' - # patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){2}(?P<quality>[^<]+)(?:[^>]+>){2}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){3}(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?' + patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){2,6}\s+<h3>(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?' + # patron = r'wrapFilm">\s*<a href="(?P<url>[^"]+)">[^>]+>(?P<year>\d+)(?:[^>]+>){2}(?P<rating>[^<]+)(?:[^>]+>){4}\s*<img src="(?P<thumb>[^"]+)(?:[^>]+>){3}(?P<title>[^<[]+)(?:\[(?P<lang>[sSuUbBiItTaA-]+))?' # paginazione if json.get('have_next') or 'have_next_film=true' in data: diff --git a/channels/cineblog01.py b/channels/cineblog01.py index fb348a88..26cfc954 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -133,28 +133,28 @@ def peliculas(item): @support.scrape def episodios(item): @support.scrape - def folder(item, data): + def folder(item, url): """ Quando c'è un link ad una cartella contenente più stagioni """ - actLike = 'episodios' - addVideolibrary = False - downloadEnabled = False + if url: + data = support.match(url).data + actLike = 'episodios' + addVideolibrary = False + downloadEnabled = False - folderUrl = scrapertools.find_single_match(data, r'TUTTA L[EA] \w+\s+(?:–|-)\s+<a href="?([^" ]+)') - data = httptools.downloadpage(folderUrl, disable_directIP=True).data - patron = r'<td>(?P<title>[^<]+)<td><a [^>]+href="(?P<url>[^"]+)[^>]+>' - sceneTitle = True - # debug = True + patron = r'<td>(?P<title>[^<]+)<td><a [^>]+href="(?P<url>[^"]+)[^>]+>' + sceneTitle = True + # debug = True - def itemHook(item): - item.serieFolder = True - return item + def itemHook(item): + item.serieFolder = True + return item return locals() # debugBlock=True data = support.match(item.url, headers=headers).data - folderItemlist = folder(item, data) if '<p>TUTTA L' in data else [] + folderItemlist = folder(item, scrapertools.find_single_match(data, r'TUTT[EA] L[EA] \w+\s+(?:–|-)\s+<a href="?([^" ]+)')) patronBlock = r'(?P<block>sp-head[^>]+>\s*(?:STAGION[EI]\s*(?:(?:DA)?\s*[0-9]+\s*A)?\s*[0-9]+|MINISSERIE)(?::\s*PARTE\s*[0-9]+)? - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?<\/div>.*?)spdiv[^>]*>' patron = r'(?:/>|<p>|<strong>)(?P<other>.*?(?P<episode>[0-9]+(?:×|×)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'