Fix Toonitalia
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
"serietvu": "https://www.serietvu.link",
|
"serietvu": "https://www.serietvu.link",
|
||||||
"streamingcommunity": "https://streamingcommunity.net",
|
"streamingcommunity": "https://streamingcommunity.net",
|
||||||
"streamtime": "https://t.me/s/StreamTime",
|
"streamtime": "https://t.me/s/StreamTime",
|
||||||
"toonitalia": "https://toonitalia.org",
|
"toonitalia": "https://toonitalia.pro",
|
||||||
"vvvvid": "https://www.vvvvid.it"
|
"vvvvid": "https://www.vvvvid.it"
|
||||||
},
|
},
|
||||||
"findhost": {
|
"findhost": {
|
||||||
|
|||||||
+14
-28
@@ -21,10 +21,10 @@ def mainlist(item):
|
|||||||
|
|
||||||
top = [('Novità',['', 'peliculas', 'new', 'tvshow']),
|
top = [('Novità',['', 'peliculas', 'new', 'tvshow']),
|
||||||
('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow'])]
|
('Aggiornamenti', ['', 'peliculas', 'last', 'tvshow'])]
|
||||||
tvshow = ['/lista-serie-tv/']
|
tvshow = ['/category/serie-tv/']
|
||||||
anime =['/lista-anime-2/',
|
anime =['/category/anime/',
|
||||||
('Sub-Ita',['/lista-anime-sub-ita/', 'peliculas', 'sub']),
|
('Sub-Ita',['/category/anime-sub-ita/', 'peliculas', 'sub']),
|
||||||
('Film Animati',['/lista-film-animazione/','peliculas', '', 'movie'])]
|
('Film Animati',['/category/film-animazione/','peliculas', '', 'movie'])]
|
||||||
search = ''
|
search = ''
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ def search(item, text):
|
|||||||
# item.contentType = 'tvshow'
|
# item.contentType = 'tvshow'
|
||||||
# itemlist += peliculas(item)
|
# itemlist += peliculas(item)
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
for par in [['/lista-serie-tv/', 'tvshow', ''],['/lista-anime-2/', 'tvshow', ''], ['/lista-anime-sub-ita/', 'tvshow', 'sub'], ['/lista-film-animazione/', 'movie', '']]:
|
for par in [['/serie-tv/', 'tvshow', ''],['/anime/', 'tvshow', ''], ['/-anime-sub-ita/', 'tvshow', 'sub'], ['/film-animazione/', 'movie', '']]:
|
||||||
item.url = host + par[0]
|
item.url = host + par[0]
|
||||||
item.contentType = par[1]
|
item.contentType = par[1]
|
||||||
item.args = par[2]
|
item.args = par[2]
|
||||||
@@ -73,46 +73,32 @@ def newest(categoria):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
search = item.text
|
search = item.text
|
||||||
pagination = ''
|
if item.contentType != 'movie': anime = True
|
||||||
anime = True
|
|
||||||
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
||||||
blacklist = ['-Film Animazione disponibili in attesa di recensione ']
|
blacklist = ['-Film Animazione disponibili in attesa di recensione ']
|
||||||
|
|
||||||
if item.args == 'search':
|
if search:
|
||||||
action = 'check'
|
pagination = ''
|
||||||
data = support.match(item).data.replace('\\','')
|
patronBlock = '"lcp_catlist"[^>]+>(?P<block>.*)</ul>'
|
||||||
patron = r'"title":"(?P<title>[^"]+)","url":"(?P<url>[^"]+)'
|
patron = r'href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
||||||
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>[^"]+)">\s*<img[^>]+src(?:set)?="(?P<thumbnail>[^ ]+)[^>]+>\s*<span[^>]+>(?P<title>[^<]+)'
|
patron = r'<a href="(?P<url>[^"]+)">\s*<img[^>]+src(?:set)?="(?P<thumbnail>[^ ]+)[^>]+>\s*<span[^>]+>(?P<title>[^<]+)'
|
||||||
elif item.args == 'new':
|
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'<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="([^"]+)">'
|
|
||||||
typeContentDict={'movie':['film']}
|
typeContentDict={'movie':['film']}
|
||||||
typeActionDict={'findvideos':['film']}
|
typeActionDict={'findvideos':['film']}
|
||||||
else:
|
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
||||||
patronBlock = '"lcp_catlist"[^>]+>(?P<block>.*)</ul>'
|
|
||||||
patron = r'<li ><a href="(?P<url>[^"]+)" title="[^>]+">(?P<title>[^<|\(]+)?(?:\([^\d]*(?P<year>\d+)\))?[^<]*</a>'
|
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
support.info(item.title)
|
support.info(item.title)
|
||||||
item.title = support.re.sub(' (?:- )?[Ss]erie [Tt][Vv]', '', item.title)
|
|
||||||
if item.args == 'sub':
|
if item.args == 'sub':
|
||||||
#corregge l'esatta lang per quelle pagine in cui c'è
|
item.title += support.typo('Sub-ITA', 'bold color kod _ []')
|
||||||
#solo sub-ita
|
|
||||||
item.title = item.title.replace('[ITA]','[Sub-ITA]')
|
|
||||||
item.contentLanguage = 'Sub-ITA'
|
item.contentLanguage = 'Sub-ITA'
|
||||||
return item
|
return item
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
def check(item):
|
|
||||||
if support.match(item, headers=headers, patron=r'(category tag">Film)').match:
|
|
||||||
item.contentType = 'movie'
|
|
||||||
return findvideos(item)
|
|
||||||
else:
|
|
||||||
item.contentType = 'tvshow'
|
|
||||||
return episodios(item)
|
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
@@ -134,4 +120,4 @@ def episodios(item):
|
|||||||
|
|
||||||
|
|
||||||
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.match(item.url, headers=headers).data )
|
||||||
|
|||||||
Reference in New Issue
Block a user