Fix ToonItalia
This commit is contained in:
+14
-47
@@ -13,12 +13,10 @@ headers = [['Referer', host]]
|
|||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|
||||||
# top = [('Novità',['', 'peliculas', 'new', 'tvshow']),
|
anime =['/category/anime',
|
||||||
# ('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow'])]
|
('ITA',['/lista-anime-ita','peliculas',]),
|
||||||
# tvshow = ['/category/serie-tv/']
|
('Sub-ITA',['/lista-anime-sub-ita', 'peliculas'])]
|
||||||
anime =['/category/anime/']
|
# ('Film Animati',['/lista-anime-ita','peliculas', '', 'movie'])]
|
||||||
# ('Sub-Ita',['/category/anime-sub-ita/', 'peliculas', 'sub']),
|
|
||||||
# ('Film Animati',['/category/film-animazione/','peliculas', '', 'movie'])]
|
|
||||||
search = ''
|
search = ''
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@@ -39,52 +37,28 @@ def search(item, text):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
|
||||||
support.info(categoria)
|
|
||||||
item = support.Item()
|
|
||||||
try:
|
|
||||||
item.contentType = 'undefined'
|
|
||||||
item.url= host
|
|
||||||
item.args= 'new'
|
|
||||||
return peliculas(item)
|
|
||||||
# Continua la ricerca in caso di errore
|
|
||||||
except:
|
|
||||||
import sys
|
|
||||||
for line in sys.exc_info():
|
|
||||||
support.logger.error("{0}".format(line))
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
# debugBlock = True
|
anime = True
|
||||||
# debug = True
|
|
||||||
# search = item.text
|
|
||||||
if item.contentType != 'movie': anime = True
|
|
||||||
action = 'check'
|
action = 'check'
|
||||||
blacklist = ['-Film Animazione disponibili in attesa di recensione ']
|
|
||||||
|
|
||||||
if item.action == 'search':
|
deflang = 'ITA' if 'sub' not in item.url else 'Sub-ITA'
|
||||||
pagination = ''
|
if 'lista' in item.url:
|
||||||
#patronBlock = '"lcp_catlist"[^>]+>(?P<block>.*)</ul>'
|
pagination = 20
|
||||||
patronBlock = '<main[^>]+>(?P<block>.*?)</ma'
|
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)'
|
||||||
#patron = r'href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
|
||||||
patron = r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<[^>]+>[^>]+>\s*<div'
|
|
||||||
elif item.args == 'last':
|
|
||||||
patronBlock = '(?:Aggiornamenti|Update)</h2>(?P<block>.*?)</ul>'
|
|
||||||
patron = r'<a href="(?P<url>[^"]+)">\s*<img[^>]+src[set]{0,3}="(?P<thumbnail>[^ ]+)[^>]+>\s*<span[^>]+>(?P<title>[^<]+)'
|
|
||||||
else:
|
else:
|
||||||
patronBlock = '<main[^>]+>(?P<block>.*)</main>'
|
patronBlock = '<main[^>]+>(?P<block>.*)</main>'
|
||||||
# patron = r'<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)".*?<p>(?P<plot>[^<]+)</p>.*?<span class="cat-links">Pubblicato in.*?.*?(?P<type>(?:[Ff]ilm|</artic))[^>]+>'
|
patron = r'(?i)<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>(:?[^>]+>){3}(?:<img.*?src="(?P<thumb>[^"]+)")?.*?<p>(?P<plot>[^<]+)</p>.*?tag">.*?(?P<type>(?:film|serie|anime))(?P<cat>.*?)</span>'
|
||||||
patron = r'<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>(:?[^>]+>){3}(?:<img.*?src="(?P<thumb>[^"]+)")?.*?<p>(?P<plot>[^<]+)</p>.*?tag">.*?(?P<type>(?:[Ff]ilm|</art|Serie Tv))'
|
|
||||||
typeContentDict={'movie':['film']}
|
typeContentDict={'movie':['film']}
|
||||||
typeActionDict={'findvideos':['film']}
|
typeActionDict={'findvideos':['film']}
|
||||||
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
support.info(item.title)
|
support.info(item.title)
|
||||||
if item.args == 'sub':
|
if 'sub/ita' in item.cat.lower():
|
||||||
item.title += support.typo('Sub-ITA', 'bold color kod _ []')
|
item.title = item.title.replace('[ITA]', '[Sub-ITA]')
|
||||||
item.contentLanguage = 'Sub-ITA'
|
item.contentLanguage = 'Sub-ITA'
|
||||||
return item
|
return item
|
||||||
return locals()
|
return locals()
|
||||||
@@ -101,18 +75,11 @@ def check(item):
|
|||||||
def episodios(item):
|
def episodios(item):
|
||||||
anime = True
|
anime = True
|
||||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||||
|
|
||||||
# if inspect.stack(0)[1][3] not in ['find_episodes']:
|
|
||||||
# from platformcode import autorenumber
|
|
||||||
# autorenumber.start(itemlist, item)
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
servers = support.server(item, data=item.data)
|
return support.server(item, data=item.data)
|
||||||
return servers
|
|
||||||
|
|
||||||
# return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
|
||||||
|
|
||||||
|
|
||||||
def clean_title(title):
|
def clean_title(title):
|
||||||
|
|||||||
Reference in New Issue
Block a user