Fix AltadefinizioneClick

This commit is contained in:
Alhaziel01
2020-03-26 22:29:42 +01:00
parent 45639bbbe0
commit f2de8c1431
+26 -18
View File
@@ -37,6 +37,7 @@ def mainlist(item):
film = ['', film = ['',
('Novità', ['/nuove-uscite/', 'peliculas', 'news']), ('Novità', ['/nuove-uscite/', 'peliculas', 'news']),
('Al Cinema', ['/al-cinema/', 'peliculas', 'cinema']), ('Al Cinema', ['/al-cinema/', 'peliculas', 'cinema']),
('A-Z',['/lista-film/', 'genres', 'az']),
('Generi', ['', 'genres', 'genres']), ('Generi', ['', 'genres', 'genres']),
('Anni', ['', 'genres', 'years']), ('Anni', ['', 'genres', 'years']),
('Qualità', ['', 'genres', 'quality']), ('Qualità', ['', 'genres', 'quality']),
@@ -50,38 +51,41 @@ def peliculas(item):
support.log() support.log()
patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">(?P<quality>[^<>]+))?.+?'\ patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">(?P<quality>[^<>]+))?.+?'\
'href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>'\ r'href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>'\
'(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ r'(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\
'(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )' r'(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )'
patronBlock = r'<h1 class="titleSection titleLastIns">.+?</h1>(?P<block>.*?)<div class="row ismobile">' 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">'\ patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">'\
'(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)"'\ r'(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)"'\
'.+?<h2 class="titleFilm(?:Mobile)?">[^>]+>(?P<title>.+?)[ ]?'\ r'.+?<h2 class="titleFilm(?:Mobile)?">[^>]+>(?P<title>.+?)[ ]?'\
'(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\ r'(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?'\
'(IMDB\:[ ](?P<rating>.+?))<' r'(IMDB\:[ ](?P<rating>.+?))<'
elif item.args == 'search': elif item.args == 'search':
patronBlock = r'<section id="lastUpdate">(?P<block>.*?)<div class="row ismobile">' 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>[^<]+)'\ patron = r'<a href="(?P<url>[^"]+)">\s*<div class="wrapperImage">(?:<span class="hd">(?P<quality>[^<]+)'\
'<\/span>)?<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<[^<]+>'\ r'<\/span>)?<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<[^<]+>'\
'(?:.*?IMDB:\s(\2[^<]+)<\/div>)?' r'(?:.*?IMDB:\s(\2[^<]+)<\/div>)?'
elif not item.args: else:
patronBlock = r'ULTIMI INSERITI(?P<block>.*?)<div class="sliderLastUpdate ismobile ">' patronBlock = r'ULTIMI INSERITI(?P<block>.*?)<div class="sliderLastUpdate ismobile ">'
# nella pagina "CERCA", la voce "SUCCESSIVO" 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="([^"]+)">' patronNext = r'<a class="next page-numbers" href="([^"]+)">'
#debug = True
return locals() return locals()
@support.scrape @support.scrape
def genres(item): def genres(item):
support.log('genres', item) support.log()
#debug = True
action = 'peliculas' action = 'peliculas'
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<' patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
if item.args == 'genres': if item.args == 'genres':
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">' 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>' patronBlock = r'<h3 class="titleSidebox dado">FILM RANDOM</h3>(?P<block>.*)</section>'
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<[]+)(?:\[(?P<lang>.+?)\])?<' patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<[]+)(?:\[(?P<lang>.+?)\])?<'
action = 'findvideos' action = 'findvideos'
elif item.args == 'az':
item.args = 'genres' 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() return locals()