Fix CB01 Anime
This commit is contained in:
@@ -21,7 +21,8 @@ headers = [['Referer', host]]
|
||||
def mainlist(item):
|
||||
anime = [('Genere',['','menu', '2']),
|
||||
('Per Lettera',['','menu', '1']),
|
||||
('Per Anno',['','menu', '3'])]
|
||||
('Per Anno',['','menu', '3']),
|
||||
('Ultimi Anime Aggiornati',['','peliculas', 'newest'])]
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -39,13 +40,34 @@ def search(item, texto):
|
||||
item.url = host + "/?s=" + texto
|
||||
return peliculas(item)
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
item.url = host
|
||||
item.args = 'newest'
|
||||
itemlist = 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 []
|
||||
|
||||
return itemlist
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
blacklist = Blacklist
|
||||
item.contentType = 'tvshow'
|
||||
patron = r'<div class="span4">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> <h1>(?P<title>[^<\[]+)(?:\[(?P<lang>[^\]]+)\])?</h1></a>.*?-->(?:.*?<br />)?\s*(?P<plot>[^<]+)'
|
||||
patronNext = r'<link rel="next" href="([^"]+)"'
|
||||
if item.args == 'newest':
|
||||
data = support.match(item)[1]
|
||||
patron = r'<div id="blockvids"><ul><li><a href="(?P<url>[^"]+)"[^>]+><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^\[]+)\[(?P<lang>[^\]]+)\]'
|
||||
else:
|
||||
patron = r'<div class="span4">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> <h1>(?P<title>[^<\[]+)(?:\[(?P<lang>[^\]]+)\])?</h1></a>.*?-->(?:.*?<br />)?\s*(?P<plot>[^<]+)'
|
||||
patronNext = r'<link rel="next" href="([^"]+)"'
|
||||
action = 'check'
|
||||
return locals()
|
||||
|
||||
@@ -72,20 +94,31 @@ def episodios(item):
|
||||
find_season = support.match(match, r'Stagione\s*(\d+)')[0]
|
||||
season = int(find_season[0]) if find_season else season + 1 if 'prima' not in match.lower() else season
|
||||
else:
|
||||
title = support.match(match,'<a[^>]+>([^<]+)</a>')[0][0]
|
||||
if 'episodio' in title.lower():
|
||||
ep = support.match(match, r'Episodio ((?:\d+.\d|\d+))')[0][0]
|
||||
if '.' in ep:
|
||||
sp += 1
|
||||
title = '0' + 'x' + str(sp).zfill(2) + ' - ' + title
|
||||
else:
|
||||
ep = int(ep)
|
||||
if season > s and ep > 1:
|
||||
s += 1
|
||||
e = ep - 1
|
||||
title = str(season) + 'x' + str(ep-e).zfill(2) + ' - ' + title
|
||||
data += title + '|' + match + '\n'
|
||||
|
||||
try: title = support.match(match,'<a[^>]+>([^<]+)</a>')[0][0]
|
||||
except: title = ''
|
||||
if title:
|
||||
if 'episodio' in title.lower():
|
||||
ep = support.match(match, r'Episodio ((?:\d+.\d|\d+|\D+))')[0][0]
|
||||
check = ep.isdigit()
|
||||
if check or '.' in ep:
|
||||
if '.' in ep:
|
||||
sp += 1
|
||||
title = '0' + 'x' + str(sp).zfill(2) + ' - ' + title
|
||||
else:
|
||||
ep = int(ep)
|
||||
if season > s and ep > 1:
|
||||
s += 1
|
||||
e = ep - 1
|
||||
title = str(season) + 'x' + str(ep-e).zfill(2) + ' - ' + title
|
||||
data += title + '|' + match + '\n'
|
||||
else:
|
||||
title += ' #movie'
|
||||
data += title + '|' + match + '\n'
|
||||
def itemHook(item):
|
||||
if '#movie' in item.title:
|
||||
item.contentType='movie'
|
||||
item.title = item.title.replace(' #movie','')
|
||||
return item
|
||||
|
||||
patron = r'(?P<title>[^\|]+)\|(?P<url>[^\n]+)\n'
|
||||
action = 'findvideos'
|
||||
|
||||
Reference in New Issue
Block a user