From acb1f92e71fae4d0251bbfabc54e6934b33d6b32 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Thu, 26 Mar 2020 22:29:42 +0100 Subject: [PATCH] Fix AltadefinizioneClick --- channels/altadefinizioneclick.py | 44 +++++++++++++++++++------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/channels/altadefinizioneclick.py b/channels/altadefinizioneclick.py index 4dc3ec50..86ae33db 100644 --- a/channels/altadefinizioneclick.py +++ b/channels/altadefinizioneclick.py @@ -37,6 +37,7 @@ def mainlist(item): film = ['', ('Novità', ['/nuove-uscite/', 'peliculas', 'news']), ('Al Cinema', ['/al-cinema/', 'peliculas', 'cinema']), + ('A-Z',['/lista-film/', 'genres', 'az']), ('Generi', ['', 'genres', 'genres']), ('Anni', ['', 'genres', 'years']), ('Qualità', ['', 'genres', 'quality']), @@ -50,38 +51,41 @@ def peliculas(item): support.log() patron = r'
[ ]?(?:(?P[^<>]+))?.+?'\ - 'href="(?P[^"]+)".+?src="(?P[^"]+)".+?

[^>]+>'\ - '(?P.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ - '(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )' - patronBlock = r'<h1 class="titleSection titleLastIns">.+?</h1>(?P<block>.*?)<div class="row ismobile">' + r'href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>'\ + r'(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ + r'(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )' + if item.args in ['news', 'cinema']: + patronBlock = r'h1>(?P<block>.*?)<div class="row ismobile">' - if item.args == 'genres': + elif item.args == 'az': + patron = r'<img style="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\ + r'<a href="(?P<url>[^"]+)" [^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<year>\d{4})' + + elif 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>.+?)[ ]?'\ - '(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ - '(IMDB\:[ ](?P<rating>.+?))<' + r'(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)"'\ + r'.+?<h2 class="titleFilm(?:Mobile)?">[^>]+>(?P<title>.+?)[ ]?'\ + r'(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ + r'(IMDB\:[ ](?P<rating>.+?))<' elif item.args == 'search': patronBlock = r'<section id="lastUpdate">(?P<block>.*?)<div class="row ismobile">' 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>)?' - elif not item.args: + r'<\/span>)?<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<[^<]+>'\ + r'(?:.*?IMDB:\s(\2[^<]+)<\/div>)?' + else: patronBlock = r'ULTIMI INSERITI(?P<block>.*?)<div class="sliderLastUpdate ismobile ">' # 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 def genres(item): - support.log('genres', item) - #debug = True + support.log() action = 'peliculas' - patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<' + patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<' if item.args == 'genres': patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">' @@ -93,8 +97,12 @@ def genres(item): patronBlock = r'<h3 class="titleSidebox dado">FILM RANDOM</h3>(?P<block>.*)</section>' patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<[]+)(?:\[(?P<lang>.+?)\])?<' action = 'findvideos' - - item.args = 'genres' + elif item.args == 'az': + blacklist = ['FILM 4K IN STREAMING'] + patron = r'<a title="(?P<title>[^"]+)" href="(?P<url>[^"]+)"' + item.args = 'az' + if not item.args == 'az': + item.args = 'genres' return locals()