Fix for series download (some problem with scrape)
This commit is contained in:
+10
-11
@@ -51,12 +51,12 @@ def mainlist(item):
|
||||
support.menu(itemlist, 'Per anno submenu', 'menu', host, args="Film per Anno")
|
||||
support.menu(itemlist, 'Cerca film... submenu', 'search', host, args='film')
|
||||
|
||||
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='episode')
|
||||
support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='episode')
|
||||
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Lettera")
|
||||
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Genere")
|
||||
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='episode', args="Serie-Tv per Anno")
|
||||
support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='episode', args='serie')
|
||||
support.menu(itemlist, 'Serie TV bold', 'peliculas', host + '/serietv/', contentType='tvshow')
|
||||
support.menu(itemlist, 'Aggiornamenti serie tv', 'last', host + '/serietv/aggiornamento-quotidiano-serie-tv/', contentType='tvshow')
|
||||
support.menu(itemlist, 'Per Lettera submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Lettera")
|
||||
support.menu(itemlist, 'Per Genere submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Genere")
|
||||
support.menu(itemlist, 'Per anno submenu', 'menu', host + '/serietv/', contentType='tvshow', args="Serie-Tv per Anno")
|
||||
support.menu(itemlist, 'Cerca serie... submenu', 'search', host + '/serietv/', contentType='tvshow', args='serie')
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
@@ -119,7 +119,7 @@ def last(item):
|
||||
infoLabels = {}
|
||||
quality = ''
|
||||
|
||||
if item.contentType == 'episode':
|
||||
if item.contentType == 'tvshow':
|
||||
matches = support.match(item, r'<a href="([^">]+)".*?>([^(:(|[)]+)([^<]+)<\/a>', '<article class="sequex-post-content.*?</article>', headers)[0]
|
||||
else:
|
||||
matches = support.match(item, r'<a href=([^>]+)>([^(:(|[)]+)([^<]+)<\/a>', r'<strong>Ultimi 100 film Aggiornati:<\/a><\/strong>(.*?)<td>', headers)[0]
|
||||
@@ -127,7 +127,7 @@ def last(item):
|
||||
for url, title, info in matches:
|
||||
add = True
|
||||
title = title.rstrip()
|
||||
if item.contentType == 'episode':
|
||||
if item.contentType == 'tvshow':
|
||||
for i in itemlist:
|
||||
if i.url == url: # togliamo i doppi
|
||||
add = False
|
||||
@@ -143,7 +143,7 @@ def last(item):
|
||||
if add:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='findvideos' if item.contentType != 'episode' else 'episodios',
|
||||
action='findvideos' if item.contentType == 'movie' else 'episodios',
|
||||
contentType=item.contentType,
|
||||
title=longtitle,
|
||||
fulltitle=title,
|
||||
@@ -177,7 +177,6 @@ def peliculas(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
item.contentType = 'episode'
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
@@ -202,7 +201,7 @@ def episodios(item):
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
contentType='episode',
|
||||
title="[B]" + episode + "[/B] " + season,
|
||||
fulltitle=episode + " " + season,
|
||||
show=episode + " " + season,
|
||||
|
||||
@@ -22,11 +22,11 @@ def mainlist(item):
|
||||
itemlist =[]
|
||||
|
||||
support.menu(itemlist, '[B]Film[/B]', 'peliculas', host + '/category/film/', 'movie')
|
||||
support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'episode')
|
||||
support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'tvshow')
|
||||
support.menu(itemlist, '[COLOR blue]Cerca Film...[/COLOR]', 'search', '')
|
||||
support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'episode')
|
||||
support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'episode')
|
||||
support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'episode')
|
||||
support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'tvshow')
|
||||
support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'tvshow')
|
||||
support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'tvshow')
|
||||
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
@@ -129,7 +129,7 @@ def peliculas(item):
|
||||
|
||||
longtitle = title + ' [COLOR blue][' + quality + '][/COLOR]'
|
||||
|
||||
if item.contentType == 'episode':
|
||||
if item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
else:
|
||||
action ='findvideos'
|
||||
@@ -181,7 +181,7 @@ def episodios(item):
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='findvideos',
|
||||
contentType=item.contentType,
|
||||
contentType='episode',
|
||||
title=title,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
@@ -206,7 +206,7 @@ def episodios(item):
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
url=url,
|
||||
contentType=item.contentType,
|
||||
contentType='episodie',
|
||||
action='findvideos'
|
||||
))
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ def mainlist(item):
|
||||
menu(itemlist, 'Film', 'peliculas', host + '/film/')
|
||||
menu(itemlist, 'Film Per Categoria', 'category', host, args='genres')
|
||||
menu(itemlist, 'Film Per Anno', 'category', host, args='year')
|
||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'episode')
|
||||
menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'episode')
|
||||
menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'episode')
|
||||
menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'episode')
|
||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'tvshow')
|
||||
menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'tvshow')
|
||||
menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'tvshow')
|
||||
menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'tvshow')
|
||||
menu(itemlist, 'Cerca...', 'search', contentType='search')
|
||||
aplay(item, itemlist, list_servers, list_quality)
|
||||
return itemlist
|
||||
@@ -46,10 +46,10 @@ def newest(categoria):
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film/'
|
||||
elif categoria == "series":
|
||||
item.contentType = 'episode'
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/serie/'
|
||||
elif categoria == "anime":
|
||||
item.contentType = 'episode'
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/anime/'
|
||||
|
||||
item.action = "peliculas"
|
||||
@@ -88,19 +88,19 @@ def search(item, texto):
|
||||
|
||||
def peliculas_src(item):
|
||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if item.contentType == 'movie':
|
||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div><span class="quality">([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<div'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'quality', 'title', 'year', 'plot'], headers, patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||
elif item.contentType == 'episode':
|
||||
elif item.contentType == 'tvshow':
|
||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?<div class="texto">([^<]+)'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||
else:
|
||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'episode':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
|
||||
def newep(item):
|
||||
log()
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@ def mainlist(item):
|
||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie-tv-streaming', 'tvshow')
|
||||
menu(itemlist, 'Per Genere submenu', 'genre', host, 'tvshow', 'TV')
|
||||
menu(itemlist, 'Per Nazione submenu', 'nation', host + '/serie-tv-streaming/', 'tvshow', 'TV')
|
||||
menu(itemlist, 'Cerca...', 'search', contentType='episode', args='TV')
|
||||
menu(itemlist, 'Cerca...', 'search', contentType='tvshow', args='TV')
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
@@ -96,7 +96,7 @@ def nation(item):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
item.contentType = 'episode'
|
||||
item.contentType = 'tvshow'
|
||||
return support.scrape(item,r'<h2>(.*?)</h2>\s*<img src="([^"]+)" alt="[^"]*" />\s*<A HREF="([^"]+)">.*?<span class="year">([0-9]{4}).*?<span class="calidad">([A-Z]+)',['title', 'thumb', 'url', 'year', 'quality'], headers, patronNext=r"<span class='current'>\d+</span><a rel='nofollow' class='page larger' href='([^']+)'>\d+</a>", action='episodios')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user