KoD 1.5
-Nuova Ricerca Globale\n-Nuova Rinumerazione\n-Messaggi di Errore più chiari\n-Fix var\n
This commit is contained in:
@@ -51,7 +51,7 @@ def peliculas(item):
|
||||
## deflang = 'ITA'
|
||||
action="findvideos"
|
||||
|
||||
patron = r'<div class="cover boxcaption"> <h2>\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+).*?src="(?P<thumb>[^"]+).*?<div class="trdublaj">(?P<quality>[^<]+).*?<span class="ml-label">(?P<year>[0-9]+).*?<span class="ml-label">(?P<duration>[^<]+).*?<p>(?P<plot>[^<]+)'
|
||||
patron = r'<div class="cover boxcaption"> +<h2>\s*<a href="(?P<url>[^"]+)">(?P<title>[^<]+).*?src="(?P<thumb>[^"]+).*?<div class="trdublaj">(?P<quality>[^<]+).*?<span class="ml-label">(?P<year>[0-9]+).*?<span class="ml-label">(?P<duration>[^<]+).*?<p>(?P<plot>[^<]+)'
|
||||
|
||||
if item.args == "search":
|
||||
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
|
||||
|
||||
@@ -73,7 +73,7 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.info("%s mainlist search log: %s" % (__channel__, line))
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
# =========== def per le novità nel menu principale =============
|
||||
|
||||
@@ -46,9 +46,8 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>'\
|
||||
r'(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )'
|
||||
# debug=True
|
||||
patron = r'<div class="wrapperImage">\s*(?:<span class="year">(?P<year>[^<]+)[^>]+>)?(?:<span class="hd">(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)".+?<h2 class="titleFilm">[^>]+>(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?</a>.*?(?:IMDB\:</strong>[ ](?P<rating>.+?)<|</h2> )'
|
||||
patronBlock = r'h1>(?P<block>.*?)<div class="row ismobile">'
|
||||
|
||||
if item.args == 'az':
|
||||
@@ -60,8 +59,8 @@ def peliculas(item):
|
||||
patron = r'<div class="wrapperImage">[ ]?(?:<span class="hd">(?P<quality>[^<>]+))?.+?href="(?P<url>[^"]+)".+?src="(?P<thumb>[^"]+)"'\
|
||||
r'.+?<h2 class="titleFilm(?:Mobile)?">[^>]+>(?P<title>.+?)[ ]?(?:|\[(?P<lang>[^\]]+)\])?(?:\((?P<year>\d{4})\))?</a>.*?(IMDB\:[ ](?P<rating>.+?))<'
|
||||
elif item.args == 'search':
|
||||
patronBlock = r'<section id="lastUpdate">(?P<block>.*?)<div class="row ismobile">'
|
||||
patron = r'<a href="(?P<url>[^"]+)">\s*<div class="wrapperImage">(?:<span class="year">(?P<year>[^<]+)<\/span>)?(?:<span class="hd">(?P<quality>[^<]+)<\/span>)?<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)'
|
||||
patronBlock = r'<section id="lastUpdate">(?P<block>.*?)(?:<div class="row ismobile">|<section)'
|
||||
patron = r'<a href="(?P<url>[^"]+)">\s*<div class="wrapperImage">(?:\s*<span class="year">(?P<year>[^<]+)<\/span>)?(?:\s*<span class="hd">(?P<quality>[^<]+)<\/span>)?[^>]+>\s*<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)'
|
||||
|
||||
if not item.args:
|
||||
patronBlock = r'ULTIMI INSERITI(?P<block>.*?)<div class="sliderLastUpdate ismobile ">'
|
||||
@@ -99,7 +98,7 @@ def search(item, texto):
|
||||
support.info("search ", texto)
|
||||
|
||||
item.args = 'search'
|
||||
item.url = host + "/search/" + texto
|
||||
item.url = host + "?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
|
||||
@@ -26,7 +26,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
data = support.match(item, patron= r'<a href="' + host + r'/category/' + item.args.lower() + r'/">' + item.args + r'</a><ul class="sub-menu">(.*?)</ul>').match
|
||||
patronBlock= r'<a href="' + host + r'/category/' + item.args.lower() + r'/">' + item.args + r'</a>\s*<ul class="sub-menu">(?P<block>.*?)</ul>'
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
|
||||
@@ -85,7 +85,7 @@ def peliculas(item):
|
||||
typeContentDict = {'movie':['movie']}
|
||||
typeActionDict = {'findvideos':['movie']}
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
def itemlistHook(itemlist):
|
||||
if item.search:
|
||||
itemlist = [ it for it in itemlist if ' Episodio ' not in it.title ]
|
||||
if len(itemlist) == int(perpage):
|
||||
@@ -97,6 +97,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
pagination = int(perpage)
|
||||
patron = epPatron
|
||||
return locals()
|
||||
@@ -107,18 +108,19 @@ def findvideos(item):
|
||||
if item.contentType == 'movie':
|
||||
matches = support.match(item, patron=epPatron).matches
|
||||
for title, url in matches:
|
||||
get_video_list(url, title, itemlist)
|
||||
# support.dbg()
|
||||
get_video_list(item, url, title, itemlist)
|
||||
else:
|
||||
get_video_list(item.url, support.config.get_localized_string(30137), itemlist)
|
||||
get_video_list(item, item.url, support.config.get_localized_string(30137), itemlist)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def get_video_list(url, title, itemlist):
|
||||
def get_video_list(item, url, title, itemlist):
|
||||
from requests import get
|
||||
if not url.startswith('http'): url = host + url
|
||||
|
||||
url = support.match(get(url).url, string=True, patron=r'file=([^$]+)').match
|
||||
if 'http' not in url: url = 'http://' + url
|
||||
itemlist.append(support.Item(title=title, url=url, server='directo', action='play'))
|
||||
itemlist.append(item.clone(title=title, url=url, server='directo', action='play'))
|
||||
|
||||
return itemlist
|
||||
@@ -27,7 +27,7 @@ def mainlist(item):
|
||||
def submenu(item):
|
||||
action = 'peliculas'
|
||||
patronBlock = r'data-taxonomy="' + item.args + r'"(?P<block>.*?)</select'
|
||||
patronMenu = r'<option class="level-\d+ (?P<u>[^"]+)"[^>]+>(?P<t>[^&]+)[^\(]+\((?P<num>\d+)'
|
||||
patronMenu = r'<option class="level-\d+ (?P<u>[^"]+)"[^>]+>(?P<t>[^(]+)[^\(]+\((?P<num>\d+)'
|
||||
def itemHook(item):
|
||||
item.url += host + '/anime/' + item.args + '/' + item.u
|
||||
item.title = support.typo(item.t, 'bold')
|
||||
@@ -54,10 +54,10 @@ def newest(categoria):
|
||||
|
||||
return itemlist
|
||||
|
||||
def search(item, texto):
|
||||
support.info(texto)
|
||||
item.args = 'noorder'
|
||||
item.url = host + '/?s=' + texto + '&cat=6010'
|
||||
def search(item, text):
|
||||
support.info('search',text)
|
||||
item.search = text
|
||||
item.url = host + '/lista-anime/'
|
||||
item.contentType = 'tvshow'
|
||||
try:
|
||||
return peliculas(item)
|
||||
@@ -71,6 +71,7 @@ def search(item, texto):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
search = item.search
|
||||
anime = True
|
||||
if 'movie' in item.url:
|
||||
action = 'findvideos'
|
||||
|
||||
@@ -59,7 +59,7 @@ def peliculas(item):
|
||||
anime = True
|
||||
blacklist = ['top 10 anime da vedere']
|
||||
if item.url != host: patronBlock = r'<div id="main-content(?P<block>.*?)<aside'
|
||||
patron = r'<figure class="(?:mh-carousel-thumb|mh-posts-grid-thumb)"> <a (?:class="[^"]+" )?href="(?P<url>[^"]+)" title="(?P<title>.*?)(?: \((?P<year>\d+)\))? (?:(?P<lang>SUB ITA|ITA))(?: (?P<title2>[Mm][Oo][Vv][Ii][Ee]))?[^"]*"><img (?:class="[^"]+"|width="[^"]+" height="[^"]+") src="(?P<thumb>[^"]+)"[^>]+'
|
||||
patron = r'<figure class="(?:mh-carousel-thumb|mh-posts-grid-thumb)">\s*<a (?:class="[^"]+" )?href="(?P<url>[^"]+)" title="(?P<title>.*?)(?: \((?P<year>\d+)\))? (?:(?P<lang>SUB ITA|ITA))(?: (?P<title2>[Mm][Oo][Vv][Ii][Ee]))?[^"]*"><img (?:class="[^"]+"|width="[^"]+" height="[^"]+") src="(?P<thumb>[^"]+)"[^>]+'
|
||||
def itemHook(item):
|
||||
if 'movie' in item.title.lower():
|
||||
item.title = support.re.sub(' - [Mm][Oo][Vv][Ii][Ee]|[Mm][Oo][Vv][Ii][Ee]','',item.title)
|
||||
|
||||
@@ -60,7 +60,7 @@ def newest(categoria):
|
||||
def submenu(item):
|
||||
data = support.match(item.url + item.args).data
|
||||
action = 'filter'
|
||||
patronMenu = r'<h5 class="[^"]+">(?P<title>[^<]+)[^>]+>[^>]+><select id="(?P<parameter>[^"]+)"[^>]+>(?P<url>.*?)</select>'
|
||||
patronMenu = r'<h5 class="[^"]+">(?P<title>[^<]+)[^>]+>[^>]+>\s*<select id="(?P<parameter>[^"]+)"[^>]+>(?P<url>.*?)</select>'
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.insert(0, item.clone(title=support.typo('Tutti','bold'), url=item.url + item.args, action='peliculas'))
|
||||
return itemlist[:-1]
|
||||
@@ -104,7 +104,7 @@ def peliculas(item):
|
||||
data = support.match(item, post=post, headers=headers).data
|
||||
if item.args == 'updated':
|
||||
page = support.match(data, patron=r'data-page="(\d+)" title="Next">').match
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?"><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s\s*(?P<type>[^\s]+)\s*(?P<episode>\d+)'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?">\s*<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s\s*(?P<type>[^\s]+)\s*(?P<episode>\d+)'
|
||||
typeContentDict = {'Movie':'movie', 'Episodio':'episode'} #item.contentType='episode'
|
||||
action = 'findvideos'
|
||||
def itemlistHook(itemlist):
|
||||
@@ -113,7 +113,7 @@ def peliculas(item):
|
||||
return itemlist
|
||||
elif 'filter' in item.args:
|
||||
page = support.match(data, patron=r'totalPages:\s*(\d+)').match
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?"><img src="(?P<thumb>[^"]+)"'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?">\s*<img src="(?P<thumb>[^"]+)"'
|
||||
def itemlistHook(itemlist):
|
||||
if item.nextpage: item.nextpage += 1
|
||||
else: item.nextpage = 2
|
||||
@@ -127,7 +127,7 @@ def peliculas(item):
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<'
|
||||
else:
|
||||
# debug=True
|
||||
patron = r'<img src="(?P<thumb>[^"]+)" alt="(?P<title>[^"\(]+)(?:\((?P<lang>[Ii][Tt][Aa])\))?(?:\s*\((?P<year>\d+)\))?[^"]*"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a class="[^"]+" href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+><p[^>]+>(?:(?P<plot>[^<]+))?<'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)" alt="(?P<title>[^"\(]+)(?:\((?P<lang>[Ii][Tt][Aa])\))?(?:\s*\((?P<year>\d+)\))?[^"]*"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<a class="[^"]+" href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>\s*<p[^>]+>(?:(?P<plot>[^<]+))?<'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ def peliculas(item):
|
||||
|
||||
itemlist.append(itm)
|
||||
|
||||
autorenumber.renumber(itemlist)
|
||||
autorenumber.start(itemlist)
|
||||
if len(itemlist) >= 30:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page + 1))
|
||||
|
||||
@@ -212,7 +212,7 @@ def episodios(item):
|
||||
contentType='episode',
|
||||
url=it['link']))
|
||||
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
autorenumber.start(itemlist, item)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
@@ -84,12 +84,12 @@ def peliculas(item):
|
||||
if not item.pag: item.pag = 1
|
||||
|
||||
anime=True
|
||||
blacklist=['Altri Hentai']
|
||||
# blacklist=['Altri Hentai']
|
||||
data = support.match(host + '/wp-content/themes/animeuniverse/functions/ajax.php', post='sorter=recent&location=&loop=main+loop&action=sort&numarticles='+perpage+'&paginated='+str(item.pag)+'¤tquery%5B'+query+'%5D='+searchtext+'&thumbnail=1').data.replace('\\','')
|
||||
patron=r'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s*(?P<lang>Sub ITA|ITA)?(?:"| \[)'
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
if len(itemlist) == int(perpage) - len(blacklist):
|
||||
def itemlistHook(itemlist):
|
||||
if len(itemlist) == int(perpage):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='peliculas'))
|
||||
return itemlist
|
||||
|
||||
@@ -88,7 +88,7 @@ def menu(item):
|
||||
action = 'submenu'
|
||||
# data = get_data(item)
|
||||
patronMenu=r'<button[^>]+>\s*(?P<title>[A-Za-z0-9]+)\s*<span.[^>]+>(?P<other>.*?)</ul>'
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.insert(0, item.clone(title=support.typo('Tutti','bold'), action='peliculas'))
|
||||
itemlist.append(item.clone(title=support.typo('Cerca...','bold'), action='search', search=True, thumbnail=support.thumb('search.png')))
|
||||
return itemlist
|
||||
@@ -174,7 +174,7 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime=True
|
||||
pagination = 50
|
||||
pagination = 25
|
||||
# data = get_data(item)
|
||||
patronBlock= r'<div class="server\s*active\s*"(?P<block>.*?)(?:<div class="server|<link)'
|
||||
patron = r'<li[^>]*>\s*<a.*?href="(?P<url>[^"]+)"[^>]*>(?P<episode>[^<]+)<'
|
||||
|
||||
@@ -105,9 +105,9 @@ def peliculas(item):
|
||||
action = 'select'
|
||||
|
||||
if item.args == 'newest':
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s+<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?<(?:[^>]+>.+?(?:title="Nuovi episodi">(?P<episode>\d+x\d+)[ ]?(?P<lang2>Sub-Ita)?|title="IMDb">(?P<rating>[^<]+)))?'
|
||||
else:
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div> <div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"[^=]+="(?P<thumb>[^"]+)"><div>\s+<div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?'
|
||||
|
||||
patronNext = r'<a href="([^"]+)" >Pagina'
|
||||
# debug = True
|
||||
|
||||
@@ -64,7 +64,7 @@ def peliculas(item):
|
||||
if item.args == 'newest':
|
||||
patron = r'<div id="blockvids">\s*<ul>\s*<li>\s*<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>[^<]+)'
|
||||
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()
|
||||
@@ -90,6 +90,7 @@ def episodios(item):
|
||||
s = 1
|
||||
e = 0
|
||||
sp = 0
|
||||
|
||||
for match in item.url:
|
||||
if 'stagione' in match.lower():
|
||||
find_season = support.match(match, patron=r'Stagione\s*(\d+)').match
|
||||
@@ -111,17 +112,17 @@ def episodios(item):
|
||||
s += 1
|
||||
e = ep - 1
|
||||
title = str(season) + 'x' + str(ep-e).zfill(2) + ' - ' + title
|
||||
data += title + '|' + match + '\n'
|
||||
data += title + '|' + match + '\|'
|
||||
else:
|
||||
title += ' #movie'
|
||||
data += title + '|' + match + '\n'
|
||||
data += title + '|' + match + '\|'
|
||||
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'
|
||||
patron = r'(?P<title>[^\|]+)\|(?P<url>[^\|]+)\|'
|
||||
action = 'findvideos'
|
||||
return locals()
|
||||
|
||||
|
||||
+52
-57
@@ -76,7 +76,7 @@ def newest(categoria):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info(item, "search", text)
|
||||
logger.info("search", text)
|
||||
if item.contentType == 'tvshow': item.url = host + '/serietv/'
|
||||
else: item.url = host
|
||||
try:
|
||||
@@ -127,40 +127,57 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
# support.dbg()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
support.info(data)
|
||||
if 'TUTTA LA ' in data:
|
||||
folderUrl = scrapertools.find_single_match(data, r'TUTTA LA \w+\s+(?:–|-)\s+<a href="?([^" ]+)')
|
||||
@support.scrape
|
||||
def folder(item, data):
|
||||
"""
|
||||
Quando c'è un link ad una cartelle di vcrypt contenente più stagioni
|
||||
"""
|
||||
actLike = 'episodios'
|
||||
addVideolibrary = False
|
||||
downloadEnabled = False
|
||||
|
||||
folderUrl = scrapertools.find_single_match(data, r'TUTTA LA \w+\s+(?:–|-)\s+<a href="?([^" ]+)').replace(
|
||||
'.net/', '.pw/') # vcrypt.pw non ha CF
|
||||
data = httptools.downloadpage(folderUrl).data
|
||||
patron = r'<a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
|
||||
patron = r'><a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)'
|
||||
sceneTitle = True
|
||||
|
||||
def itemHook(item):
|
||||
item.serieFolder = True
|
||||
return item
|
||||
else:
|
||||
patronBlock = r'(?P<block>sp-head[^>]+>\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?<\/div>.*?)spdiv[^>]*>'
|
||||
patron = r'(?:/>|<p>|<strong>)(?P<url>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||
def itemlistHook(itemlist):
|
||||
title_dict = {}
|
||||
itlist = []
|
||||
for item in itemlist:
|
||||
item.title = re.sub(r'\.(\D)',' \\1', item.title)
|
||||
match = support.match(item.title, patron=r'(\d+.\d+)').match.replace('x','')
|
||||
item.order = match
|
||||
if match not in title_dict:
|
||||
title_dict[match] = item
|
||||
elif match in title_dict and item.contentLanguage == title_dict[match].contentLanguage \
|
||||
or item.contentLanguage == 'ITA' and not title_dict[match].contentLanguage \
|
||||
or title_dict[match].contentLanguage == 'ITA' and not item.contentLanguage:
|
||||
title_dict[match].url = item.url
|
||||
else:
|
||||
title_dict[match + '1'] = item
|
||||
return locals()
|
||||
|
||||
for key, value in title_dict.items():
|
||||
itlist.append(value)
|
||||
# debug=True
|
||||
data = support.match(item.url, headers=headers).data
|
||||
folderItemlist = folder(item, data) if 'TUTTA LA ' in data else []
|
||||
|
||||
return sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order)))
|
||||
patronBlock = r'(?P<block>sp-head[^>]+>\s*(?:STAGION[EI]\s*(?:DA\s*[0-9]+\s*A)?\s*[0-9]+|MINISERIE) - (?P<lang>[^-<]+)(?:- (?P<quality>[^-<]+))?.*?<\/div>.*?)spdiv[^>]*>'
|
||||
patron = r'(?:/>|<p>|<strong>)(?P<other>.*?(?P<episode>[0-9]+(?:×|ÃÂ)[0-9]+)\s*(?P<title2>.*?)?(?:\s*–|\s*-|\s*<).*?)(?:<\/p>|<br)'
|
||||
def itemlistHook(itemlist):
|
||||
title_dict = {}
|
||||
itlist = []
|
||||
for i in itemlist:
|
||||
i.url = item.url
|
||||
i.title = re.sub(r'\.(\D)',' \\1', i.title)
|
||||
match = support.match(i.title, patron=r'(\d+.\d+)').match.replace('x','')
|
||||
i.order = match
|
||||
if match not in title_dict:
|
||||
title_dict[match] = i
|
||||
elif match in title_dict and i.contentLanguage == title_dict[match].contentLanguage \
|
||||
or i.contentLanguage == 'ITA' and not title_dict[match].contentLanguage \
|
||||
or title_dict[match].contentLanguage == 'ITA' and not i.contentLanguage:
|
||||
title_dict[match].url = i.url
|
||||
else:
|
||||
title_dict[match + '1'] = i
|
||||
|
||||
for key, value in title_dict.items():
|
||||
itlist.append(value)
|
||||
|
||||
itlist = sorted(itlist, key=lambda it: (it.contentLanguage, int(it.order)))
|
||||
|
||||
itlist.extend(folderItemlist)
|
||||
|
||||
return itlist
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -172,14 +189,14 @@ def findvideos(item):
|
||||
|
||||
def load_links(itemlist, re_txt, desc_txt, quality=""):
|
||||
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
|
||||
support.info('STREAMING', streaming)
|
||||
support.info('STREAMING=', streaming)
|
||||
logger.debug('STREAMING', streaming)
|
||||
logger.debug('STREAMING=', streaming)
|
||||
matches = support.match(streaming, patron = r'<td><a.*?href=([^ ]+) [^>]+>([^<]+)<').matches
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, scrapedurl, scrapedtitle))
|
||||
itemlist.append(item.clone(action="play", title=scrapedtitle, url=scrapedurl, server=scrapedtitle, quality=quality))
|
||||
|
||||
support.info()
|
||||
logger.debug()
|
||||
|
||||
itemlist = []
|
||||
|
||||
@@ -211,34 +228,12 @@ def findvideos(item):
|
||||
|
||||
|
||||
def findvid_serie(item):
|
||||
def load_vid_series(html, item, itemlist, blktxt):
|
||||
support.info('HTML',html)
|
||||
# Estrae i contenuti
|
||||
matches = support.match(html, patron=r'<a href=(?:")?([^ "]+)[^>]+>(?!<!--)(.*?)(?:</a>|<img)').matches
|
||||
for url, server in matches:
|
||||
item = item.clone(action="play", title=server, url=url, server=server, quality=blktxt)
|
||||
if 'swzz' in item.url: item.url = support.swzz_get_url(item)
|
||||
itemlist.append(item)
|
||||
logger.debug()
|
||||
data = re.sub(r'((?:<p>|<strong>)?[^\d]*\d*(?:×|Ã)[0-9]+[^<]+)', '', item.other)
|
||||
|
||||
support.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = re.sub(r'((?:<p>|<strong>)?[^\d]*\d*(?:×|Ã)[0-9]+[^<]+)', '' ,item.url)
|
||||
|
||||
# Blocks with split
|
||||
blk = re.split(r"(?:>\s*)?([A-Za-z\s0-9]*):\s*<", data, re.S)
|
||||
blktxt = ""
|
||||
for b in blk:
|
||||
if b[0:3] == "a h" or b[0:4] == "<a h":
|
||||
load_vid_series("<%s>" % b, item, itemlist, blktxt)
|
||||
blktxt = ""
|
||||
elif len(b.strip()) > 1:
|
||||
blktxt = b.strip()
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
return support.server(item, data=data)
|
||||
|
||||
|
||||
def play(item):
|
||||
support.info()
|
||||
logger.debug()
|
||||
return servertools.find_video_items(item, data=item.url)
|
||||
|
||||
@@ -59,13 +59,12 @@ def peliculas(item):
|
||||
patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})))/".+?url\((?P<thumb>[^\)]+)\)">'
|
||||
elif item.contentType == 'tvshow':
|
||||
if item.args == 'update':
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ](?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^<]+?url\((?P<thumb>.+?)\)">\s+<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ](?:<div class="genere">)?(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
pagination = 25
|
||||
else:
|
||||
patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>[^"\(]+)(?:"|\()(?:(?P<year>\d+)[^"]+)?.*?url\((?P<thumb>[^\)]+)\)(?:.*?<div class="voto">[^>]+>[^>]+>\s*(?P<rating>[^<]+))?.*?<div class="titolo">[^>]+>(?:<div class="genere">[^ ]*(?:\s\d+)?\s*(?:\()?(?P<lang>[^\)< ]+))?'
|
||||
else:
|
||||
#search
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
|
||||
def itemHook(item):
|
||||
if 'sub' in item.contentLanguage.lower() and not 'ita' in item.contentLanguage.lower():
|
||||
@@ -152,6 +151,7 @@ def newest(categoria):
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def check(item):
|
||||
support.info()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
@@ -171,10 +171,11 @@ def check(item):
|
||||
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.url = data
|
||||
item.data = data
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
item.url = item.url.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
|
||||
return support.server(item, data= item.url)
|
||||
item.data = item.data.replace('http://rapidcrypt.net/verys/', '').replace('http://rapidcrypt.net/open/', '') #blocca la ricerca
|
||||
return support.server(item, data=item.data)
|
||||
|
||||
@@ -89,9 +89,14 @@ def peliculas(item):
|
||||
patronBlock = r'<div id="%s"[^>]+>(?P<block>.*?)<div class="vistaDettagliata"' % item.args[1]
|
||||
patron = r'<li>\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="thumb">[^>]+>[^>]+>[^>]+>\s*[EePp]+\s*(?P<episode>\d+)[^>]+>\s<img src="(?P<thumb>[^"]+)"'
|
||||
else:
|
||||
patron = r'<div class="showStreaming"> <b>(?P<title>[^<]+)[^>]+>[^>]+>\s*<span>Lingua:\s*(?P<lang>[^>]+)?>[<>br\s]+a href="(?P<url>[^"]+)"[^>]+>.*?--image-url:url\(/*(?P<thumb>[^\)]+).*?Anno di inizio</b>:\s*(?P<year>[0-9]{4})'
|
||||
patron = r'<div class="showStreaming"> +<b>(?P<title>[^<]+)[^>]+>[^>]+>\s*<span>Lingua:\s*(?P<lang>[^>]+)?>[<>br\s]+a href="(?P<url>[^"]+)"[^>]+>.*?--image-url:url\(/*(?P<thumb>[^\)]+).*?Anno di inizio</b>:\s*(?P<year>[0-9]{4})'
|
||||
patronNext = '<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">'
|
||||
|
||||
def itemHook(item):
|
||||
if item.thumbnail and not item.thumbinail.startswith('http'):
|
||||
item.thumbnail = 'http://' + item.thumbnail
|
||||
return item
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
+9
-9
@@ -75,7 +75,7 @@ def peliculas(item):
|
||||
else:
|
||||
patron = r'<div class="cover-racolta">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)".*?<p class="title[^>]+>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patron = r'<article[^>]+>[^>]+>[^>]+>(?:<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>)?.*?<a href="(?P<url>[^"]+)">\s*(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<p>(?P<plot>[^<]+)<'
|
||||
patron = r'<article[^>]+>[^>]+>[^>]+>(?:<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>)?.*?<a href="(?P<url>[^"]+)"[^>]*>\s*(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<p>(?P<plot>[^<]+)<'
|
||||
patronNext = r'<a class="page-numbers next" href="([^"]+)">'
|
||||
|
||||
# select category
|
||||
@@ -121,14 +121,14 @@ def episodios(item):
|
||||
else:
|
||||
patron = r'class="title-episodio">(?P<title>[^<]+)<(?P<url>.*?)<p'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
counter = 0
|
||||
for item in itemlist:
|
||||
episode = support.match(item.title, patron=r'\d+').match
|
||||
if episode == '1':
|
||||
counter += 1
|
||||
item.title = support.typo(str(counter) + 'x' + episode.zfill(2) + support.re.sub(r'\[[^\]]+\](?:\d+)?','',item.title),'bold')
|
||||
return itemlist
|
||||
# def itemlistHook(itemlist):
|
||||
# counter = 0
|
||||
# for item in itemlist:
|
||||
# episode = support.match(item.title, patron=r'\d+').match
|
||||
# if episode == '1':
|
||||
# counter += 1
|
||||
# item.title = support.typo(str(counter) + 'x' + episode.zfill(2) + support.re.sub(r'\[[^\]]+\](?:\d+)?','',item.title),'bold')
|
||||
# return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ def findhost(url):
|
||||
host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
return host
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
|
||||
+83
-46
@@ -25,14 +25,12 @@ host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
Tvshow = [
|
||||
('Aggiornamenti', ['', 'peliculas', '', 'update']),
|
||||
('Cerca... {bold}{TV}', ['','search'])
|
||||
('Aggiornamenti', ['', 'peliculas', 'update']),
|
||||
('Cerca... {bold}{TV}', ['', 'search'])
|
||||
]
|
||||
|
||||
# search = ''
|
||||
@@ -46,6 +44,16 @@ def peliculas(item):
|
||||
# support.dbg()
|
||||
deflang = 'Sub-ITA'
|
||||
|
||||
# è una singola pagina con tutti gli episodi
|
||||
if item.grouped and not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
item.grouped = False
|
||||
return episodios_args(item)
|
||||
|
||||
# ogni puntata è un articolo a se
|
||||
if item.fulltitle:
|
||||
item.url = host + '?s=' + item.fulltitle
|
||||
actLike = 'episodios'
|
||||
|
||||
action = 'findvideos'
|
||||
blacklist = ['']
|
||||
if item.args == 'genres':
|
||||
@@ -53,32 +61,45 @@ def peliculas(item):
|
||||
patron = r'[^>]+>[^>]+>.+?href="(?P<url>[^"]+)[^>]>(?P<title>[^<]+)\s<'
|
||||
action = 'episodios'
|
||||
elif item.args == 'search':
|
||||
patronBlock = r'</h1> </header>(?P<block>.*?)</main>'
|
||||
patronMenu = r'(?:<img src="(?P<thumb>[^"]+)"[^>]+>)?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"[^>]+>(?:(?P<title>.+?)[ ](?P<episode>[\d&#;\d]+\d+|\d+..\d+)(?: \([a-zA-Z\s]+\) )(?:s\d+e\d+)?[ ]?(?:[&#\d;|.{3}]+)(?P<title2>[^&#\d;|^.{3}]+)(?:|.+?))<'
|
||||
group = True
|
||||
patronBlock = r'</header>(?P<block>.*?)</main>'
|
||||
patron = '(?:<img[^>]+src="(?P<thumb>[^"]+)".*?)?<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+?)(?:(?P<episode>\d+×\d+|\d+×\d+)|\[[sS](?P<season>[0-9]+)[^]]+\])\s?(?:(?P<lang>\([a-zA-Z\s]+\)) (?:[Ss]\d+[Ee]\d+)?\s?(?:[&#\d;|.{3}]+)(?P<title2>[^”[<]+)(?:&#\d)?)?'
|
||||
else:
|
||||
patron = r'<div class="featured-thumb"> <a href="(?P<url>[^"]+)" title="(?:(?P<title>.+?)[ ]?(?P<episode>\d+×\d+).+?“(?P<title2>.+?)”).+?">'
|
||||
# è una singola pagina con tutti gli episodi
|
||||
if item.args != 'update' and not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
return episodios_args(item)
|
||||
patron = r'<div class="featured-thumb"> +<a href="(?P<url>[^"]+)" title="(?P<title>[^[]+)\[(?P<episode>\d+×\d+)?'
|
||||
patronBlock = r'<main id="main"[^>]+>(?P<block>.*?)<div id="secondary'
|
||||
|
||||
# def itemlistHook(itemlist):
|
||||
# from core import scraper
|
||||
# return scraper.sort_episode_list(itemlist)
|
||||
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
#debug = True
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
def episodios_args(item):
|
||||
actLike = 'episodios'
|
||||
# support.dbg()
|
||||
|
||||
deflang = 'Sub-ITA'
|
||||
action = 'findvideos'
|
||||
patron = '(?P<episode>\d+×\d+|\d+[Ã.]+\d+)(?:\s?\((?P<lang>[a-zA-Z ]+)\))?(?:\s[Ss]\d+[Ee]+\d+)? +(?:“|“)(?P<title2>.*?)(?:”|”).*?(?P<other>.*?)(?:/>|<p)'
|
||||
patronBlock = r'<main id="main" class="site-main" role="main">(?P<block>.*?)</main>'
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.info(item)
|
||||
#support.dbg()
|
||||
return episodios_args(item)
|
||||
|
||||
deflang = 'Sub-ITA'
|
||||
action = 'findvideos'
|
||||
blacklist = ['']
|
||||
patron = r'<div class="featured-thumb"> <a href="(?P<url>[^"]+)" title="(?:(?P<title>.+?)[ ]?(?P<episode>\d+×\d+|\d+[Ã.]+\d+).+?“(?P<title2>.+?)”).+?">'
|
||||
patronBlock = r'<main id="main" class="site-main" role="main">(?P<block>.*?)</main>'
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
@@ -140,38 +161,54 @@ def newest(categoria):
|
||||
|
||||
def findvideos(item):
|
||||
support.info('findvideos ->', item)
|
||||
itemlist = []
|
||||
patronBlock = '<div class="entry-content">(?P<block>.*)<footer class="entry-footer">'
|
||||
patron = r'<a href="([^"]+)">'
|
||||
html = support.match(item, patron=patron, patronBlock=patronBlock, headers=headers)
|
||||
matches = html.matches
|
||||
data= html.data
|
||||
|
||||
if item.args != 'episodios':
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
for scrapedurl in matches:
|
||||
if 'is.gd' in scrapedurl:
|
||||
resp = httptools.downloadpage(scrapedurl, follow_redirects=False)
|
||||
data += resp.headers.get("location", "") + '\n'
|
||||
itemlist = []
|
||||
if item.other.startswith('http'):
|
||||
resp = httptools.downloadpage(item.url, follow_redirects=False)
|
||||
data = resp.headers.get("location", "") + '\n'
|
||||
elif item.other:
|
||||
html = support.match(item.other, patron=patron, headers=headers)
|
||||
matches = html.matches
|
||||
data = html.data
|
||||
for scrapedurl in matches:
|
||||
if 'is.gd' in scrapedurl:
|
||||
resp = httptools.downloadpage(scrapedurl, follow_redirects=False)
|
||||
data += resp.headers.get("location", "") + '\n'
|
||||
elif not support.scrapertools.find_single_match(item.url, '-[0-9]+x[0-9]+-'):
|
||||
return episodios(item)
|
||||
else:
|
||||
patronBlock = '<div class="entry-content">(?P<block>.*)<footer class="entry-footer">'
|
||||
html = support.match(item, patron=patron, patronBlock=patronBlock, headers=headers)
|
||||
matches = html.matches
|
||||
data= html.data
|
||||
|
||||
if item.args != 'episodios':
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
for scrapedurl in matches:
|
||||
if 'is.gd' in scrapedurl:
|
||||
resp = httptools.downloadpage(scrapedurl, follow_redirects=False)
|
||||
data += resp.headers.get("location", "") + '\n'
|
||||
|
||||
itemlist += support.server(item, data)
|
||||
|
||||
data = support.match(item.url).data
|
||||
patron = r'>Posted in <a href="https?://fastsubita.com/serietv/([^/]+)/(?:[^"]+)?"'
|
||||
series = scrapertools.find_single_match(data, patron)
|
||||
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold color kod')
|
||||
itemlist.append(
|
||||
item.clone(channel=item.channel,
|
||||
title=goseries + titles,
|
||||
fulltitle=titles,
|
||||
show=series,
|
||||
contentType='tvshow',
|
||||
contentSerieName=series,
|
||||
url=host+"/serietv/"+series,
|
||||
action='episodios',
|
||||
contentTitle=titles,
|
||||
plot = "Vai alla Serie " + titles + " con tutte le puntate",
|
||||
))
|
||||
# data = support.match(item.url).data
|
||||
# patron = r'>Posted in <a href="https?://fastsubita.com/serietv/([^/]+)/(?:[^"]+)?"'
|
||||
# series = scrapertools.find_single_match(data, patron)
|
||||
# titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
||||
# goseries = support.typo("Vai alla Serie:", ' bold color kod')
|
||||
# itemlist.append(
|
||||
# item.clone(channel=item.channel,
|
||||
# # title=goseries + titles,
|
||||
# title=titles,
|
||||
# fulltitle=titles,
|
||||
# show=series,
|
||||
# contentType='tvshow',
|
||||
# contentSerieName=series,
|
||||
# url=host+"/serietv/"+series,
|
||||
# action='episodios',
|
||||
# contentTitle=titles,
|
||||
# plot = "Vai alla Serie " + titles + " con tutte le puntate",
|
||||
# ))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "film4k",
|
||||
"name": "Film4k",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "film4k.png",
|
||||
"banner": "film4k.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info()
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
|
||||
@@ -99,7 +99,7 @@ def genres(item):
|
||||
|
||||
def select(item):
|
||||
support.info()
|
||||
patron=r'class="taxonomy category" ><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||
patron=r'class="taxonomy category"\s*><span property="name">([^>]+)</span></a><meta property="position" content="2">'
|
||||
block = support.match(item.url, patron=patron,headers=headers).match
|
||||
if block.lower() != 'film':
|
||||
support.info('select = ### è una serie ###')
|
||||
|
||||
@@ -51,7 +51,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info('search', item)
|
||||
support.info('search', text)
|
||||
item.contentType = 'tvshow'
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
@@ -66,5 +66,5 @@ def search(item, text):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[guardaserie_live] findvideos")
|
||||
logger.debug()
|
||||
return support.server(item, item.url)
|
||||
@@ -28,7 +28,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
patronBlock = r'movies-list movies-list-full(?P<block>.*?)footer>'
|
||||
patron = r'<div data-movie-id[^>]+> <a href="(?P<url>[^"]+).*?<img data-original="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+).*?rel="tag">(?P<year>\d+).*?jt-info">(?P<duration>\d+)'
|
||||
patron = r'<div data-movie-id[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>[^>]+><img src="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d*)[^>]+>[^>]+>[^>]+>(?P<duration>\d*)'
|
||||
patronNext = '<li class=.active.>.*?href=.(.*?).>'
|
||||
action = 'episodios'
|
||||
return locals()
|
||||
|
||||
@@ -128,7 +128,7 @@ def search(item, text):
|
||||
info(text)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/wp-json/wp/v2/search?search=" + text
|
||||
item.url = host + "/wp-json/wp/v2/search?per_page=100&search=" + text
|
||||
results = support.httptools.downloadpage(item.url).json
|
||||
for r in results:
|
||||
title = r['title']
|
||||
|
||||
+33
-55
@@ -2,22 +2,11 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per italiaserie
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
|
||||
Problemi noti che non superano il test del canale:
|
||||
|
||||
|
||||
Avvisi:
|
||||
|
||||
|
||||
Ulteriori info:
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
from core import support, httptools, scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from platformcode import config, logger
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
@@ -25,11 +14,11 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.info()
|
||||
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'update']),
|
||||
('Generi', ['', 'category', 'Serie-Tv per Genere'])
|
||||
tvshow = ['',
|
||||
('Aggiornamenti', ['/aggiornamento-episodi/', 'peliculas', 'update']),
|
||||
('Top 10', ['/top-10', 'peliculas', 'top']),
|
||||
('Netflix {tv submenu}', ['/genere/netflix', 'peliculas']),
|
||||
('A-Z', ['/lista-completa', 'peliculas', 'a-z'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
@@ -37,44 +26,46 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
|
||||
action = 'episodios'
|
||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\
|
||||
'title="(?P<title>[^"]+)">\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"\[]+)[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
||||
|
||||
if item.args == 'update':
|
||||
patron += r'.*?aj-eps">(?P<episode>.+?)[ ]?(?P<lang>Sub-Ita|Ita)</span>'
|
||||
pagination = ''
|
||||
patron = r'br />(?P<title>[^–]+)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+)\s*(?P<title2>[^\(<]+)(?:\((?P<lang>[^\)]+))??'
|
||||
action = 'findvideos'
|
||||
if item.args == 'top':
|
||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>:\s*(?P<rating>[^/]+)'
|
||||
if item.args =='a-z':
|
||||
pagination = ''
|
||||
patron = r'<li ><a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
||||
patronNext = r'<a class="next page-numbers" href="(.*?)">'
|
||||
|
||||
## debug = True
|
||||
def itemHook(item):
|
||||
item.title = support.re.sub(r'<[^>]+>','', item.title)
|
||||
return item
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.info()
|
||||
res = support.match(item, patron=r'<a href="([^"]+)">>')
|
||||
if res.match: data = support.match(res.match).data
|
||||
else: data = res.data
|
||||
|
||||
patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\
|
||||
'<div class="su-spoiler-content".*?)<div class="clearfix">'
|
||||
patron = r'(?:(?P<season>\d+)?</div> <div class="su-spoiler-content"(:?.+?)?> )?'\
|
||||
'<div class="su-link-ep">\s+<a.*?href="(?P<url>[^"]+)".*?strong>[ ]'\
|
||||
'(?P<title>.+?)[ ](?P<episode>\d+-\d+|\d+)[ ](?:-\s+(?P<title2>.+?))?'\
|
||||
'[ ]?(?:(?P<lang>Sub-ITA))?[ ]?</strong>'
|
||||
patronBlock = r'(?:Stagione|STAGIONE)\s*(?P<lang>[^<]+)?(?:</p>)?(?P<block>.*?)</p>'
|
||||
patron = r'(?:p>|/>)(?P<title>[^–]+)–(?P<data>.*?)(?:<br|$)'
|
||||
|
||||
|
||||
#debug = True
|
||||
def itemHook(item):
|
||||
item.title = support.re.sub('<[^>]+>','', item.title)
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
support.info()
|
||||
|
||||
action = 'peliculas'
|
||||
patron = r'<li class="cat-item.*?href="(?P<url>[^"]+)".*?>(?P<title>.*?)</a>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -111,41 +102,28 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.info("{0}".format(line))
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
logger.debug()
|
||||
|
||||
if item.args == 'update':
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
url_video = scrapertools.find_single_match(data, r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>', -1)
|
||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)" />')
|
||||
data = support.match(item.url, headers=headers).data
|
||||
url_video = support.match(data, patron=r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>').matches
|
||||
url_serie = support.match(data, patron=r'<link rel="canonical" href="([^"]+)" />').matches
|
||||
goseries = support.typo("Vai alla Serie:", ' 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,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType='tvshow',
|
||||
contentSerieName=item.contentSerieName,
|
||||
url=url_serie,
|
||||
action='episodios',
|
||||
contentTitle=item.contentSerieName,
|
||||
plot = goseries + series + "con tutte le puntate",
|
||||
))
|
||||
itemlist.append(item.clone(title=goseries + series, contentType='tvshow', url=url_serie, action='episodios', plot = goseries + series + "con tutte le puntate"))
|
||||
|
||||
return itemlist
|
||||
else:
|
||||
return support.server(item, data=item.url)
|
||||
return support.server(item, data=item.data)
|
||||
|
||||
+16
-11
@@ -87,24 +87,27 @@ def live(item):
|
||||
for key in it['tuningInstruction']['urn:theplatform:tv:location:any']:
|
||||
urls += key['publicUrls']
|
||||
plot = support.typo(guide['currentListing']['mediasetlisting$epgTitle'],'bold') + '\n' + guide['currentListing']['mediasetlisting$shortDescription'] + '\n' + guide['currentListing']['description'] + '\n\n' + support.typo('A Seguire:' + guide['nextListing']['mediasetlisting$epgTitle'], 'bold')
|
||||
|
||||
itemlist.append(item.clone(title=support.typo(it['title'], 'bold'),
|
||||
fulltitle=it['title'],
|
||||
show=it['title'],
|
||||
contentTitle=it['title'],
|
||||
thumbnail=it['thumbnails']['channel_logo-100x100']['url'],
|
||||
forcethumb = True,
|
||||
urls=urls,
|
||||
plot=plot,
|
||||
action='play'))
|
||||
fulltitle=it['title'],
|
||||
show=it['title'],
|
||||
contentTitle=it['title'],
|
||||
thumbnail=it['thumbnails']['channel_logo-100x100']['url'],
|
||||
forcethumb = True,
|
||||
urls=urls,
|
||||
plot=plot,
|
||||
action='play'))
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
def peliculas(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
titlelist = []
|
||||
contentType = ''
|
||||
json = get_programs(item)
|
||||
for it in json:
|
||||
if item.search.lower() in it['title'].lower():
|
||||
if item.search.lower() in it['title'].lower() and it['title'] not in titlelist:
|
||||
titlelist.append(it['title'])
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
urls = []
|
||||
@@ -184,8 +187,10 @@ def episodios(item):
|
||||
plot=it['longDescription'] if 'longDescription' in it else it['description'],
|
||||
urls=urls,
|
||||
url=it['mediasetprogram$pageUrl']))
|
||||
if episode: support.videolibrary(itemlist, item)
|
||||
return sorted(itemlist, key=lambda it: it.title)
|
||||
if episode:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
support.videolibrary(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.info()
|
||||
|
||||
@@ -13,7 +13,7 @@ headers = {'X-Requested-With': 'XMLHttpRequest'}
|
||||
def mainlist(item):
|
||||
item.url = host
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul> </div'
|
||||
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul>\s*</div'
|
||||
patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb('music')
|
||||
@@ -24,7 +24,7 @@ def mainlist(item):
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo('Cerca...', 'bold color kod'),
|
||||
title=support.typo('Cerca...', 'bold'),
|
||||
contentType='music',
|
||||
url=item.url,
|
||||
action='search',
|
||||
|
||||
@@ -111,7 +111,7 @@ def episodios(item):
|
||||
anime = True
|
||||
pagination = 50
|
||||
patronBlock = r'<table>(?P<block>.*?)</table>'
|
||||
patron = r'<tr><td><b>(?P<title>(?:\d+)?.*?)\s*(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title2>[^<]+)(?P<url>.*?)<tr>'
|
||||
patron = r'<tr><td><b>(?P<title>(?:\d+)?.*?)\s*(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title2>[^<]+)(?P<data>.*?)<tr>'
|
||||
def itemHook(item):
|
||||
clear = support.re.sub(r'\[[^\]]+\]', '', item.title)
|
||||
if clear.isdigit():
|
||||
@@ -121,4 +121,4 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
if item.contentType == 'movie': return support.server(item)
|
||||
else: return support.server(item, item.url)
|
||||
else: return support.server(item, item.data)
|
||||
|
||||
@@ -29,7 +29,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info()
|
||||
logger.info('search', text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
|
||||
+20
-19
@@ -73,27 +73,28 @@ def peliculas(item):
|
||||
pagination = pagination_values[support.config.get_setting('pagination','paramount')]
|
||||
item.url = host + '/api/search?activeTab=' + Type + '&searchFilter=site&pageNumber=0&rowsPerPage=10000'
|
||||
data = jsontools.load(support.match(item).data)['response']['items']
|
||||
|
||||
titles = []
|
||||
for it in data:
|
||||
title = it['meta']['header']['title']
|
||||
support.info(title, it)
|
||||
d = it['meta']['date'].split('/') if it['meta']['date'] else ['0000','00','00']
|
||||
date = int(d[2] + d[1] + d[0])
|
||||
if item.search.lower() in title.lower() \
|
||||
and 'stagione' not in it['url'] \
|
||||
and 'season' not in it['url'] \
|
||||
and title not in ['Serie TV']:
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo(title,'bold'),
|
||||
action=action,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
contentTitle=title if it['type'] == 'movie' else '',
|
||||
contentSerieName=title if it['type'] != 'movie' else '',
|
||||
plot= it['meta']['description'] if 'description' in it['meta'] else '',
|
||||
url=host + it['url'],
|
||||
date=date,
|
||||
thumbnail='https:' + it['media']['image']['url'] if 'url' in it['media']['image'] else item.thumbnail))
|
||||
if title not in titles:
|
||||
titles.append(title)
|
||||
d = it['meta']['date'].split('/') if it['meta']['date'] else ['0000','00','00']
|
||||
date = int(d[2] + d[1] + d[0])
|
||||
if item.search.lower() in title.lower() \
|
||||
and 'stagione' not in it['url'] \
|
||||
and 'season' not in it['url'] \
|
||||
and title not in ['Serie TV']:
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo(title,'bold'),
|
||||
action=action,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
contentTitle=title if it['type'] == 'movie' else '',
|
||||
contentSerieName=title if it['type'] != 'movie' else '',
|
||||
plot= it['meta']['description'] if 'description' in it['meta'] else '',
|
||||
url=host + it['url'],
|
||||
date=date,
|
||||
thumbnail='https:' + it['media']['image']['url'] if 'url' in it['media']['image'] else item.thumbnail))
|
||||
itemlist.sort(key=lambda item: item.fulltitle)
|
||||
if not item.search:
|
||||
itlist = []
|
||||
|
||||
+38
-11
@@ -3,9 +3,9 @@
|
||||
# Canale per Rai Play
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import requests
|
||||
import requests, sys
|
||||
from core import support
|
||||
import sys
|
||||
from platformcode import autorenumber
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
@@ -118,7 +118,6 @@ def replay(item):
|
||||
return itemlist
|
||||
|
||||
def search(item, text):
|
||||
# support.dbg()
|
||||
support.info()
|
||||
itemlist =[]
|
||||
try:
|
||||
@@ -224,13 +223,23 @@ def peliculas(item):
|
||||
def select(item):
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['blocks']
|
||||
for key in json:
|
||||
itemlist.append(item.clone(title = support.typo(key['name'],'bold'), url = key['sets'], action = 'episodios'))
|
||||
if len(itemlist) == 1:
|
||||
return episodios(itemlist[0])
|
||||
if type(item.url) in [list, dict]:
|
||||
json = item.url
|
||||
else:
|
||||
return itemlist
|
||||
json = current_session.get(item.url).json()
|
||||
if 'blocks' in json:
|
||||
json = json['blocks']
|
||||
season = ''
|
||||
for key in json:
|
||||
if item.fulltitle in key['name']: season = key['name'].replace(item.fulltitle, '').strip()
|
||||
if not season.isdigit(): season = ''
|
||||
itemlist.append(item.clone(title = support.typo(key['name'],'bold'), season = season, url = key['sets'], action = 'select'))
|
||||
if len(itemlist) == 1:
|
||||
return episodios(itemlist[0])
|
||||
else:
|
||||
for key in item.url:
|
||||
itemlist.append(item.clone(title = support.typo(key['name'], 'bold'), url = getUrl(key['path_id']), contentType = 'tvshow', action = 'episodios'))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
@@ -241,6 +250,8 @@ def episodios(item):
|
||||
itemlist.append(item.clone(title = support.typo(key['name'], 'bold'), url = getUrl(key['path_id']), contentType = 'tvshow', action = 'episodios'))
|
||||
|
||||
elif type(item.url) in [list, dict]:
|
||||
for key in item.url:
|
||||
load_episodes(key, item)
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
itlist = [executor.submit(load_episodes, key, item) for key in item.url]
|
||||
for res in futures.as_completed(itlist):
|
||||
@@ -254,6 +265,7 @@ def episodios(item):
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||
|
||||
else:
|
||||
date = ''
|
||||
if type(item.url) in [list, dict]: item.url = getUrl(item.url[0]['path_id'])
|
||||
json = current_session.get(item.url).json()['items']
|
||||
for key in json:
|
||||
@@ -263,15 +275,30 @@ def episodios(item):
|
||||
episode = ep[1].zfill(2)
|
||||
title = support.re.sub(r'(?:St\s*\d+)?\s*Ep\s*\d+','',key['subtitle'])
|
||||
title = season + 'x' + episode + (' - ' + title if not title.startswith(' ') else title if title else '')
|
||||
elif item.season and support.match(item.title.lower(), patron =r'(puntate)').match:
|
||||
title = key['subtitle'].strip()
|
||||
if not title: title = key['name']
|
||||
date = support.match(title, patron=r'(\d+/\d+/\d+)').match
|
||||
if date:
|
||||
date = title.split('/')
|
||||
date = date[2][-2] + '/' + date[1] + '/' + date[0]
|
||||
|
||||
else:
|
||||
title = key['subtitle'].strip()
|
||||
# title = key['subtitle'].strip()
|
||||
if not title:
|
||||
title = key['name']
|
||||
itemlist.append(item.clone(title = support.typo(title, 'bold'), action = 'findvideos', VL=True if ep else False, plot = key['description'],
|
||||
fanart = getUrl(key['images']['landscape']), url = key['video_url'], contentType = 'episode'))
|
||||
fanart = getUrl(key['images']['landscape']), url = key['video_url'], contentType = 'episode', date=date))
|
||||
|
||||
if item.season and support.match(item.title.lower(), patron =r'(puntate)').match:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.date)
|
||||
for i, it in enumerate(itemlist):
|
||||
episode = str(i + 1)
|
||||
it.title = support.typo(item.season + 'x' + episode, 'bold') + (' - ' + it.title)
|
||||
|
||||
if itemlist and itemlist[0].VL: support.videolibrary(itemlist, item)
|
||||
if itemlist and not support.match(itemlist[0].title, patron=r'[Ss]?(\d+)(?:x|_|\.|\s+)[Ee]?[Pp]?(\d+)').match:
|
||||
autorenumber.start(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
+5
-7
@@ -107,10 +107,8 @@ def episodios(item):
|
||||
# for i, season in enumerate(seasons.matches):
|
||||
# data += get_season(seasons.data if i == 0 else '', season[0], season[1])
|
||||
import sys
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
@@ -118,12 +116,12 @@ def episodios(item):
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
|
||||
patron = r'(?P<title>[^\|]+)\|(?P<url>[^\n]+)\n'
|
||||
# debug = True
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
action = 'findvideos'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: int(support.re.sub(r'\[[^\]]+\]','',item.title).split('x')[0]))
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -25,7 +25,7 @@ def findhost(url):
|
||||
host = support.match(url, patron=r'href="([^"]+)">\s*cliccando qui').matches[-1]
|
||||
return host
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
@@ -337,7 +337,8 @@ def list_az(item):
|
||||
item.clone(action="lista_serie",
|
||||
data='\n\n'.join(alphabet[letter]),
|
||||
title=letter,
|
||||
fulltitle=letter))
|
||||
fulltitle=letter,
|
||||
args=''))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
+20
-6
@@ -4,6 +4,9 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
@@ -26,13 +29,23 @@ def mainlist(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.info(texto)
|
||||
item.args='search'
|
||||
item.contentType='tvshow'
|
||||
item.url = host + '/wp-json/wp/v2/search?search=' + texto
|
||||
def search(item, text):
|
||||
support.info(text)
|
||||
# item.args='search'
|
||||
item.text = text
|
||||
itemlist = []
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
# item.url = host + '/lista-serie-tv/'
|
||||
# item.contentType = 'tvshow'
|
||||
# itemlist += peliculas(item)
|
||||
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', '']]:
|
||||
item.url = host + par[0]
|
||||
item.contentType = par[1]
|
||||
item.args = par[2]
|
||||
itemlist += executor.submit(peliculas, item).result()
|
||||
return itemlist
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
@@ -59,6 +72,7 @@ def newest(categoria):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
search = item.text
|
||||
pagination = ''
|
||||
anime = True
|
||||
action = 'findvideos' if item.contentType == 'movie' else 'episodios'
|
||||
|
||||
+2
-3
@@ -30,7 +30,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info("[vedohd.py] " + item.url + " search " + text)
|
||||
logger.info("search",text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
|
||||
return support.dooplay_search(item, blacklist)
|
||||
@@ -44,7 +44,6 @@ def findvideos(item):
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Trailer':
|
||||
logger.info(link['title'])
|
||||
server, quality = scrapertools.find_single_match(link['title'], '([^ ]+) ?(HD|3D)?')
|
||||
if quality:
|
||||
title = server + " [COLOR blue][" + quality + "][/COLOR]"
|
||||
@@ -63,7 +62,7 @@ def menu(item):
|
||||
|
||||
|
||||
def play(item):
|
||||
logger.info("[vedohd.py] play")
|
||||
logger.debug()
|
||||
|
||||
data = support.swzz_get_url(item)
|
||||
|
||||
|
||||
+11
-8
@@ -4,19 +4,21 @@
|
||||
# ----------------------------------------------------------
|
||||
import requests, sys
|
||||
from core import support, tmdb
|
||||
from platformcode import autorenumber
|
||||
from platformcode import autorenumber, logger
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
# Creating persistent session
|
||||
current_session = requests.Session()
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0'}
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36'}
|
||||
|
||||
# Getting conn_id token from vvvvid and creating payload
|
||||
login_page = host + '/user/login'
|
||||
try:
|
||||
conn_id = current_session.get(login_page, headers=headers).json()['data']['conn_id']
|
||||
res = current_session.get(login_page, headers=headers)
|
||||
conn_id = res.json()['data']['conn_id']
|
||||
payload = {'conn_id': conn_id}
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14', 'Cookie': res.headers['set-cookie']}
|
||||
except:
|
||||
conn_id = ''
|
||||
|
||||
@@ -126,7 +128,7 @@ def peliculas(item):
|
||||
if 'category' in item.args:
|
||||
support.thumb(itemlist,genre=True)
|
||||
elif not 'filter' in item.args:
|
||||
if item.contentType != 'movie': autorenumber.renumber(itemlist)
|
||||
if item.contentType != 'movie': autorenumber.start(itemlist)
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
@@ -165,10 +167,10 @@ def episodios(item):
|
||||
if type(title) == tuple: title = title[0]
|
||||
itemlist.append(
|
||||
item.clone(title = title,
|
||||
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
||||
url= host + show_id + '/season/' + str(key['season_id']),
|
||||
action= 'findvideos',
|
||||
video_id= key['video_id']))
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
autorenumber.start(itemlist, item)
|
||||
if autorenumber.check(item) == True \
|
||||
or support.match(itemlist[0].title, patron=r"(\d+x\d+)").match:
|
||||
support.videolibrary(itemlist,item)
|
||||
@@ -181,11 +183,12 @@ def findvideos(item):
|
||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||
item.url = host + str(json_file['data'][0]['show_id']) + '/season/' + str(json_file['data'][0]['episodes'][0]['season_id']) + '/'
|
||||
item.video_id = json_file['data'][0]['episodes'][0]['video_id']
|
||||
|
||||
logger.info('url=',item.url)
|
||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||
for episode in json_file['data']:
|
||||
logger.info(episode)
|
||||
if episode['video_id'] == item.video_id:
|
||||
url = vvvvid_decoder.dec_ei(episode['embed_info'] or episode['embed_info'])
|
||||
url = vvvvid_decoder.dec_ei(episode['embed_info'] or episode['embed_info_sd'])
|
||||
if 'youtube' in url: item.url = url
|
||||
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
||||
if 'https' not in item.url:
|
||||
|
||||
@@ -14,15 +14,15 @@ YOUTUBE_V3_API_KEY = "AIzaSyCjsmBT0JZy1RT-PLwB-Zkfba87sa2inyI"
|
||||
|
||||
|
||||
def youtube_api_call(method, parameters):
|
||||
logger.info("method=" + method + ", parameters=" + repr(parameters))
|
||||
logger.debug("method=" + method + ", parameters=" + repr(parameters))
|
||||
|
||||
encoded_parameters = urllib.urlencode(parameters)
|
||||
|
||||
url = "https://www.googleapis.com/youtube/v3/" + method + "?" + encoded_parameters + "&key=" + YOUTUBE_V3_API_KEY;
|
||||
logger.info("url=" + url)
|
||||
logger.debug("url=" + url)
|
||||
|
||||
data = httptools.downloadpage(url).data
|
||||
logger.info("data=" + data)
|
||||
logger.debug("data=" + data)
|
||||
|
||||
json_object = jsontools.load(data)
|
||||
|
||||
@@ -51,13 +51,13 @@ def youtube_get_playlist_items(playlist_id, pageToken=""):
|
||||
|
||||
# Show all YouTube playlists for the selected channel
|
||||
def playlists(item, channel_id, pageToken=""):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
json_object = youtube_get_user_playlists(channel_id, pageToken)
|
||||
|
||||
for entry in json_object["items"]:
|
||||
logger.info("entry=" + repr(entry))
|
||||
logger.debug("entry=" + repr(entry))
|
||||
|
||||
title = entry["snippet"]["title"]
|
||||
plot = entry["snippet"]["description"]
|
||||
@@ -85,13 +85,13 @@ def latest_videos(item, channel_id):
|
||||
|
||||
# Show all YouTube videos for the selected playlist
|
||||
def videos(item, pageToken=""):
|
||||
logger.info()
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
json_object = youtube_get_playlist_items(item.url, pageToken)
|
||||
|
||||
for entry in json_object["items"]:
|
||||
logger.info("entry=" + repr(entry))
|
||||
logger.debug("entry=" + repr(entry))
|
||||
|
||||
title = entry["snippet"]["title"]
|
||||
plot = entry["snippet"]["description"]
|
||||
|
||||
Reference in New Issue
Block a user