Fix SerieTVU (Numerazione Serie)
This commit is contained in:
@@ -23,8 +23,7 @@ list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
|
||||
|
||||
tvshow = ['/category/serie-tv',
|
||||
('Aggiornamenti Serie', ['/ultimi-episodi/', 'peliculas', 'update']),
|
||||
('Generi', ['', 'genres', 'genres'])
|
||||
@@ -35,47 +34,41 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
|
||||
patronBlock = r'<div class="wrap">\s+<h.>.*?</h.>(?P<block>.*?)<footer>'
|
||||
|
||||
|
||||
|
||||
if item.args != 'update':
|
||||
action = 'episodios'
|
||||
patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
|
||||
action = 'episodios'
|
||||
patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
|
||||
else:
|
||||
action = 'findvideos'
|
||||
patron = r'<div class="item">\s+?<a href="(?P<url>[^"]+)"\s+?data-original="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)<[^>]+>\((?P<episode>[\dx\-]+)\s+?(?P<lang>Sub-Ita|[iITtAa]+)\)<'
|
||||
pagination = 25
|
||||
|
||||
patronNext = r'<li><a href="([^"]+)"\s+?>Pagina successiva'
|
||||
|
||||
#support.regexDbg(item, patron, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
|
||||
seasons, data = support.match(item, r'<option value="(\d+)"[^>]*>\D+(\d+)')
|
||||
patronBlock = r'</select><div style="clear:both"></div></h2>(?P<block>.*?)<div id="trailer" class="tab">'
|
||||
patron = r'(?:<div class="list (?:active)?" data-id="(?P<season>\d+)">[^>]+>)?\s+<a data-id="(?P<episode>\d+)(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<url>[^>]+)>[^>]+>[^>]+>(?P<title>.+?)(?:\sSub-ITA)?<'
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
patron = r'(?:<div class="list (?:active)?" data-id="(?P<season>\d+)">[^>]+>)?\s*<a data-id="(?P<episode>\d+)(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<url>[^>]+)>[^>]+>[^>]+>(?P<title>.+?)(?:\sSub-ITA)?<'
|
||||
def itemHook(item):
|
||||
for value, season in seasons:
|
||||
log(value)
|
||||
log(season)
|
||||
item.title = item.title.replace(value+'x',season+'x')
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
log()
|
||||
|
||||
blacklist = ["Home Page", "Calendario Aggiornamenti"]
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<h2>Sfoglia</h2>\s*<ul>(?P<block>.*?)</ul>\s*</section>'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>'
|
||||
#debug = True
|
||||
|
||||
patronMenu = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -92,6 +85,7 @@ def search(item, text):
|
||||
log("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
itemlist = []
|
||||
@@ -117,7 +111,7 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
log()
|
||||
if item.args != 'update':
|
||||
return support.server(item, data=item.url)
|
||||
return support.server(item, data=item.url)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
@@ -125,14 +119,13 @@ def findvideos(item):
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
## support.log("DATA - HTML:\n", data)
|
||||
url_video = scrapertoolsV2.find_single_match(data, r'<div class="item"> <a data-id="[^"]+" data-href="([^"]+)" data-original="[^"]+"[^>]+> <div> <div class="title">Episodio \d+', -1)
|
||||
url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
goseries = support.typo("Vai alla Serie:" + item.contentSerieName, ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
|
||||
itemlist = support.server(item, data=url_video)
|
||||
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=goseries + series,
|
||||
@@ -145,6 +138,5 @@ def findvideos(item):
|
||||
contentTitle=item.contentSerieName,
|
||||
plot = goseries + series + "con tutte le puntate",
|
||||
))
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
return itemlist
|
||||
|
||||
return itemlist
|
||||
|
||||
Reference in New Issue
Block a user