Fix Altadefinizione

This commit is contained in:
Alhaziel01
2022-08-18 18:45:24 +02:00
parent 2d67edd310
commit 89e13e71f8
+20 -11
View File
@@ -20,12 +20,14 @@ headers = [['Referer', host]]
@support.menu @support.menu
def mainlist(item): def mainlist(item):
film = ['/genere/film/', film = ['/category/film/',
('Al Cinema', ['/al-cinema/', 'peliculas']), ('Al Cinema', ['/al-cinema/', 'peliculas']),
('Generi', ['', 'genres']), ('Generi', ['', 'genres']),
('Sub-ITA', ['/sub-ita/', 'peliculas'])] # ('Sub-ITA', ['/sub-ita/', 'peliculas'])
]
tvshow = ['/genere/serie-tv/'] tvshow = ['/category/serie-tv/',
('Aggiornamenti Serie TV', ['/aggiornamenti-serie-tv/', 'peliculas']),]
search = '' search = ''
@@ -37,12 +39,19 @@ def genres(item):
action = 'peliculas' action = 'peliculas'
blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime'] blacklist = ['Scegli il Genere', 'Film', 'Serie TV', 'Sub-Ita', 'Anime']
patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)' patronMenu = r'<option value="(?P<url>[^"]+)">(?P<title>[^<]+)'
def itemlistHook(itemlist):
itl = []
for item in itemlist:
if len(item.fulltitle) != 3:
itl.append(item)
return itl
return locals() return locals()
def search(item, text): def search(item, text):
logger.debug(text) logger.debug(text)
item.url = "{}/?s={}".format(host, text) item.url = "{}/search/{}/feed/rss2/".format(host, text)
item.args = 'search'
try: try:
return peliculas(item) return peliculas(item)
@@ -59,9 +68,10 @@ def peliculas(item):
n = '22' if '/?s=' in item.url else '8' n = '22' if '/?s=' in item.url else '8'
item.contentType = "undefined" item.contentType = "undefined"
action = 'check' action = 'check'
# patron = r'data-src="(?P<thumb>http[^"]+)(?:[^>]+>){' + n + r'}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>' patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
patron = r'data-src="(?P<poster>http[^"]+)(?:[^>]+>){7,18}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>' if item.args == 'search':
patronNext = r'href="([^"]+)[^>]+>»' patron = '<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?[^>]+>\s*<link>(?P<url>[^<]+)'
patronNext = r'href="([^"]+)[^>]+>Successivo'
return locals() return locals()
@@ -70,15 +80,14 @@ def episodios(item):
item.quality = '' item.quality = ''
data = item.data data = item.data
action='findvideos' action='findvideos'
# patronBlock = r'[Ss]tagione.*?\s(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>' patronBlock = r'<span>\s*\w+\s*[Ss]tagione.*?(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>'
patronBlock = r'<strong>\s*\w+\s*[Ss]tagione.*?(?P<lang>(?:[Ss][Uu][Bb][-]?)?[Ii][Tt][Aa])(?: in )?(?P<quality>[^<]*)?(?:[^>]+>){4}(?P<block>.*?)/p>' patron = r'(?P<season>\d+)x(?P<episode>\d+)</li>(?P<data>.*?)(?:</table)'
patron = r'(?P<season>\d+)&[^:]+;(?P<episode>\d+)(?P<data>.*?)(?:<br|$)'
return locals() return locals()
def check(item): def check(item):
item.data = httptools.downloadpage(item.url).data item.data = httptools.downloadpage(item.url).data
if 'rel="tag">Serie TV' in item.data: if 'episode_no"' in item.data:
item.contentType = 'tvshow' item.contentType = 'tvshow'
return episodios(item) return episodios(item)
else: else: