Fix ToonItalia
This commit is contained in:
@@ -1,49 +1,13 @@
|
|||||||
{
|
{
|
||||||
"id": "toonitalia",
|
"id": "toonitalia",
|
||||||
"name": "ToonItalia",
|
"name": "ToonItalia",
|
||||||
"language": ["ita"],
|
"language": ["ita", "sub-ita"],
|
||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"thumbnail": "toonitalia.png",
|
"thumbnail": "toonitalia.png",
|
||||||
"banner": "toonitalia.png",
|
"banner": "toonitalia.png",
|
||||||
"categories": ["tvshow", "movie", "vos", "anime"],
|
"categories": ["tvshow", "movie", "vos", "anime"],
|
||||||
"settings": [
|
"not_active":["include_in_newest_peliculas"],
|
||||||
{
|
"default_off":["include_in_newest"],
|
||||||
"id": "include_in_global_search",
|
"settings": []
|
||||||
"type": "bool",
|
|
||||||
"label": "Includi in Ricerca Globale",
|
|
||||||
"default": true,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks",
|
|
||||||
"type": "bool",
|
|
||||||
"label": "Verifica se i link esistono",
|
|
||||||
"default": false,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "checklinks_number",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Numero di link da verificare",
|
|
||||||
"default": 1,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": "eq(-1,true)",
|
|
||||||
"lvalues": [ "5", "10", "15", "20" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "filter_languages",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Mostra link in lingua...",
|
|
||||||
"default": 0,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true,
|
|
||||||
"lvalues": [
|
|
||||||
"No filtrar",
|
|
||||||
"Italiano"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
+51
-11
@@ -20,24 +20,57 @@ def mainlist(item):
|
|||||||
top = [('Novità',['', 'peliculas', 'new', 'tvshow']),
|
top = [('Novità',['', 'peliculas', 'new', 'tvshow']),
|
||||||
('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow']),
|
('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow']),
|
||||||
('Popolari', ['', 'peliculas', 'most_view', 'tvshow'])]
|
('Popolari', ['', 'peliculas', 'most_view', 'tvshow'])]
|
||||||
tvshow = '/lista-serie-tv/'
|
tvshow = ['/lista-serie-tv/']
|
||||||
anime =['/lista-anime-2/',
|
anime =['/lista-anime-2/',
|
||||||
('Sub-Ita',['/lista-anime-sub-ita/', 'peliculas', 'sub']),
|
('Sub-Ita',['/lista-anime-sub-ita/', 'peliculas', 'sub']),
|
||||||
('Film Animati',['/lista-film-animazione/','peliculas', '', 'movie'])]
|
('Film Animati',['/lista-film-animazione/','peliculas', '', 'movie'])]
|
||||||
search = ''
|
search = ''
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
|
def search(item, texto):
|
||||||
|
support.log(texto)
|
||||||
|
item.args='search'
|
||||||
|
item.contentType='tvshow'
|
||||||
|
item.url = host + '/?s=' + texto
|
||||||
|
try:
|
||||||
|
return peliculas(item)
|
||||||
|
return itemlist
|
||||||
|
# Continua la ricerca in caso di errore
|
||||||
|
except:
|
||||||
|
import sys
|
||||||
|
for line in sys.exc_info():
|
||||||
|
support.logger.error("%s" % line)
|
||||||
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
def newest(categoria):
|
||||||
|
support.log(categoria)
|
||||||
|
item = support.Item()
|
||||||
|
try:
|
||||||
|
item.contentType = 'tvshow'
|
||||||
|
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):
|
||||||
## import web_pdb; web_pdb.set_trace()
|
|
||||||
pagination = ''
|
pagination = ''
|
||||||
anime = True
|
anime = True
|
||||||
blacklist = ['-Film Animazione disponibili in attesa di recensione ']
|
blacklist = ['-Film Animazione disponibili in attesa di recensione ']
|
||||||
|
|
||||||
if item.args == 'search':
|
if item.args == 'search':
|
||||||
patron = r'<h2 class="entry-title"><a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>'
|
patron = r'<h2 class="entry-title"><a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>.*?<p>(?P<plot>[^<]+)</p>.*?<span class="cat-links">Pubblicato in.*?.*?(?P<type>(?:[Ff]ilm|</artic))[^>]+>'
|
||||||
|
typeContentDict={'movie':['film']}
|
||||||
|
typeActionDict={'findvideos':['film']}
|
||||||
|
patronNext = r'<a href="([^"]+)"\s*>Articoli meno recenti'
|
||||||
elif item.args == 'last':
|
elif item.args == 'last':
|
||||||
patronBlock = 'Aggiornamenti</h2>(?P<block>.*)</ul>'
|
patronBlock = 'Aggiornamenti</h2>(?P<block>.*)</ul>'
|
||||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
||||||
@@ -46,19 +79,23 @@ def peliculas(item):
|
|||||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
||||||
elif item.args == 'new':
|
elif item.args == 'new':
|
||||||
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>'
|
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))[^>]+>'
|
||||||
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
||||||
|
typeContentDict={'movie':['film']}
|
||||||
|
typeActionDict={'findvideos':['film']}
|
||||||
else:
|
else:
|
||||||
patronBlock = '"lcp_catlist"[^>]+>(?P<block>.*)</ul>'
|
patronBlock = '"lcp_catlist"[^>]+>(?P<block>.*)</ul>'
|
||||||
patron = r'<li ><a href="(?P<url>[^"]+)" title="[^>]+">(?P<title>[^<|\(]+)?(?:\([^\d]*(?P<year>\d+)\))?[^<]*</a>'
|
patron = r'<li ><a href="(?P<url>[^"]+)" title="[^>]+">(?P<title>[^<|\(]+)?(?:\([^\d]*(?P<year>\d+)\))?[^<]*</a>'
|
||||||
|
|
||||||
if item.args == 'sub':
|
def itemHook(item):
|
||||||
def itemHook(item):
|
support.log(item.title)
|
||||||
|
item.title = support.re.sub(' (?:- )?[Ss]erie [Tt][Vv]', '', item.title)
|
||||||
|
if item.args == 'sub':
|
||||||
#corregge l'esatta lang per quelle pagine in cui c'è
|
#corregge l'esatta lang per quelle pagine in cui c'è
|
||||||
#solo sub-ita
|
#solo sub-ita
|
||||||
item.title = item.title.replace('[ITA]','[Sub-ITA]')
|
item.title = item.title.replace('[ITA]','[Sub-ITA]')
|
||||||
item.contentLanguage = 'Sub-ITA'
|
item.contentLanguage = 'Sub-ITA'
|
||||||
return item
|
return item
|
||||||
|
|
||||||
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
||||||
|
|
||||||
@@ -68,18 +105,21 @@ def peliculas(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
anime = True
|
anime = True
|
||||||
data = support.httptools.downloadpage(item.url, headers=headers).data
|
data = support.match(item, headers=headers)[1]
|
||||||
if 'https://vcrypt.net' in data:
|
if 'https://vcrypt.net' in data:
|
||||||
patron = r'(?:<br /> |<p>)(?P<title>[^<]+)<a href="(?P<url>[^"]+)"'
|
patron = r'(?:<br /> |<p>)(?P<title>[^<]+)<a href="(?P<url>[^"]+)"'
|
||||||
else:
|
else:
|
||||||
patron = r'<br /> <a href="(?P<url>[^"]+)" target="_blank" rel="noopener[^>]+>(?P<title>[^<]+)</a>'
|
patron = r'<br />\s*<a href="(?P<url>[^"]+)" target="_blank" rel="noopener[^>]+>(?P<title>[^<]+)</a>'
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
item.title = item.title.replace('_',' ').replace('–','-')
|
item.title = support.re.sub(r'\[B\]|\[/B\]', '', item.title)
|
||||||
|
item.title = item.title.replace('_',' ').replace('–','-').replace('×','x').replace('-','-').replace(' ',' ')
|
||||||
item.title = support.re.sub(item.fulltitle + ' - ','',item.title)
|
item.title = support.re.sub(item.fulltitle + ' - ','',item.title)
|
||||||
|
item.title = support.typo(item.title.strip(' -'),'bold')
|
||||||
return item
|
return item
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
return support.server(item, item.url if item.contentType != 'movie' else support.httptools.downloadpage(item.url, headers=headers).data )
|
return support.server(item, item.url if item.contentType != 'movie' else support.httptools.downloadpage(item.url, headers=headers).data )
|
||||||
|
|||||||
Reference in New Issue
Block a user