KoD 1.4
- completato il supporto al futuro Kodi 19\n- ridisegnato infoplus\n- fix vari ed eventuali\n
This commit is contained in:
+11
-11
@@ -76,7 +76,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
|
||||
# Ordine delle voci
|
||||
# Voce FILM, puoi solo impostare l'url
|
||||
@@ -147,7 +147,7 @@ def mainlist(item):
|
||||
# AVVERTENZE: Se il titolo è trovato nella ricerca TMDB/TVDB/Altro allora le locandine e altre info non saranno quelle recuperate nel sito.!!!!
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
#support.dbg() # decommentare per attivare web_pdb
|
||||
|
||||
action = ''
|
||||
@@ -162,7 +162,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
#support.dbg()
|
||||
|
||||
action = ''
|
||||
@@ -179,7 +179,7 @@ def episodios(item):
|
||||
# per genere, per anno, per lettera, per qualità ecc ecc
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
#support.dbg()
|
||||
|
||||
action = ''
|
||||
@@ -199,7 +199,7 @@ def genres(item):
|
||||
# e la ricerca porta i titoli mischiati senza poterli distinguere tra loro
|
||||
# andranno modificate anche le def peliculas e episodios ove occorre
|
||||
def select(item):
|
||||
support.log('select --->', item)
|
||||
support.info('select --->', item)
|
||||
#support.dbg()
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# pulizia di data, in caso commentare le prossime 2 righe
|
||||
@@ -207,7 +207,7 @@ def select(item):
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
block = scrapertools.find_single_match(data, r'')
|
||||
if re.findall('', data, re.IGNORECASE):
|
||||
support.log('select = ### è una serie ###')
|
||||
support.info('select = ### è una serie ###')
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
@@ -220,7 +220,7 @@ def select(item):
|
||||
############## Fondo Pagina
|
||||
# da adattare al canale
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/index.php?do=search&story=%s&subaction=search' % (text)
|
||||
@@ -233,7 +233,7 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log('search log:', line)
|
||||
info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ def search(item, text):
|
||||
# inserire newest solo se il sito ha la pagina con le ultime novità/aggiunte
|
||||
# altrimenti NON inserirlo
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -256,7 +256,7 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('newest log: ', {0}.format(line))
|
||||
support.info('newest log: ', {0}.format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -266,5 +266,5 @@ def newest(categoria):
|
||||
# sia per i siti con hdpass
|
||||
#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True)
|
||||
def findvideos(item):
|
||||
support.log('findvideos ->', item)
|
||||
support.info('findvideos ->', item)
|
||||
return support.server(item, headers=headers)
|
||||
|
||||
@@ -47,7 +47,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log('peliculas',item)
|
||||
support.info('peliculas', item)
|
||||
|
||||
## deflang = 'ITA'
|
||||
action="findvideos"
|
||||
@@ -69,7 +69,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log('genres',item)
|
||||
support.info('genres',item)
|
||||
|
||||
if item.args != 'orderalf': action = "peliculas"
|
||||
else: action = 'orderalf'
|
||||
@@ -90,7 +90,7 @@ def genres(item):
|
||||
|
||||
@support.scrape
|
||||
def orderalf(item):
|
||||
support.log('orderalf',item)
|
||||
support.info('orderalf',item)
|
||||
|
||||
action= 'findvideos'
|
||||
patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
@@ -102,7 +102,7 @@ def orderalf(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(item, text)
|
||||
support.info(item, text)
|
||||
|
||||
|
||||
itemlist = []
|
||||
@@ -119,7 +119,7 @@ def search(item, text):
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
@@ -141,5 +141,5 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos', item)
|
||||
support.info('findvideos', item)
|
||||
return support.server(item, headers=headers)
|
||||
|
||||
@@ -15,7 +15,7 @@ headers = [['Referer', host]]
|
||||
# =========== home menu ===================
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log('mainlist',item)
|
||||
support.info('mainlist',item)
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/film-del-cinema', 'peliculas', '']),
|
||||
@@ -33,7 +33,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
support.log('peliculas',item)
|
||||
support.info('peliculas',item)
|
||||
|
||||
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<div class="[^"]+" style="background-image:url\((?P<thumb>[^\)]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<year>\d{4})[^>]+>[^>]+>(?:\s*(?P<duration>\d+)[^>]+>[^>]+>)?\s*(?P<quality>[a-zA-Z]+) [^>]+>[^>]+> (?P<lang>[^>]+) [^>]+>'
|
||||
patronNext = r'<span>\d</span> <a href="([^"]+)">'
|
||||
@@ -43,7 +43,7 @@ def peliculas(item):
|
||||
# =========== def pagina categorie ======================================
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log('genres',item)
|
||||
support.info('genres',item)
|
||||
|
||||
action = 'peliculas'
|
||||
if item.args == 'genres':
|
||||
@@ -63,7 +63,7 @@ def genres(item):
|
||||
# =========== def per cercare film/serietv =============
|
||||
#host+/index.php?do=search&story=avatar&subaction=search
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host+"/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
@@ -79,7 +79,7 @@ def search(item, text):
|
||||
# =========== def per le novità nel menu principale =============
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest', categoria)
|
||||
support.info('newest', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -101,5 +101,5 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos', item)
|
||||
support.info('findvideos', item)
|
||||
return support.server(item, support.match(item, patron='<ul class="playernav">.*?</ul>', headers=headers).match)
|
||||
|
||||
@@ -96,7 +96,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
def search(item, texto):
|
||||
support.log("search ", texto)
|
||||
support.info("search ", texto)
|
||||
|
||||
item.args = 'search'
|
||||
item.url = host + "/?s=" + texto
|
||||
@@ -110,7 +110,7 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -135,7 +135,7 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos', item)
|
||||
support.info('findvideos', item)
|
||||
return support.hdpass_get_servers(item)
|
||||
|
||||
def play(item):
|
||||
|
||||
@@ -32,7 +32,7 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.search = texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
@@ -45,7 +45,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
@@ -78,11 +78,10 @@ def peliculas(item):
|
||||
query='category_name'
|
||||
searchtext = item.url.split('/')[-2]
|
||||
if not item.pag: item.pag = 1
|
||||
|
||||
anime=True
|
||||
# debug = True
|
||||
anime = True
|
||||
data = support.match(host + '/wp-admin/admin-ajax.php', post='action=itajax-sort&loop=main+loop&location=&thumbnail=1&rating=1sorter=recent&columns=4&numarticles='+perpage+'&paginated='+str(item.pag)+'¤tquery%5B'+query+'%5D='+searchtext).data.replace('\\','')
|
||||
patron=r'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s+(?P<type>Movie)?\s*(?P<lang>Sub Ita|Ita)'
|
||||
|
||||
patron = '<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s+(?P<type>Movie)?\s*(?P<lang>Sub Ita|Ita)?\s*[sS]treaming'
|
||||
typeContentDict = {'movie':['movie']}
|
||||
typeActionDict = {'findvideos':['movie']}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ def submenu(item):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
@@ -55,7 +55,7 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.args = 'noorder'
|
||||
item.url = host + '/?s=' + texto + '&cat=6010'
|
||||
item.contentType = 'tvshow'
|
||||
@@ -114,7 +114,7 @@ def episodios(item):
|
||||
else:
|
||||
patron = r'<a\s*href="(?P<url>[^"]+)"\s*title="(?P<title>[^"]+)"\s*class="btn btn-dark mb-1">'
|
||||
def itemHook(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
if item.url.startswith('//'): item.url= 'https:' + item.url
|
||||
elif item.url.startswith('/'): item.url= 'https:/' + item.url
|
||||
return item
|
||||
@@ -123,7 +123,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
itemlist = []
|
||||
|
||||
if 'adf.ly' in item.url:
|
||||
|
||||
@@ -31,7 +31,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
@@ -83,7 +83,7 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
data = support.match(item, headers=headers, patronBlock=r'entry-content clearfix">(.*?)class="mh-widget mh-posts-2 widget_text').block
|
||||
if not 'pagination clearfix' in data:
|
||||
support.log('NOT IN DATA')
|
||||
support.info('NOT IN DATA')
|
||||
patron = r'<iframe.*?src="(?P<url>[^"]+)"'
|
||||
title = item.title
|
||||
def fullItemlistHook(itemlist):
|
||||
@@ -124,7 +124,7 @@ def check(item):
|
||||
return data
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
if item.data:
|
||||
data = item.data
|
||||
else:
|
||||
|
||||
+40
-51
@@ -10,50 +10,12 @@ from platformcode import config
|
||||
host = support.config.get_channel_url()
|
||||
headers={'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
||||
def get_data(item, head=[]):
|
||||
global headers
|
||||
jstr = ''
|
||||
for h in head:
|
||||
headers[h[0]] = h[1]
|
||||
if not item.count: item.count = 0
|
||||
if not config.get_setting('key', item.channel):
|
||||
matches = support.match(item, patron=r'<script>(.*?location.href=".*?(http[^"]+)";)</').match
|
||||
if matches:
|
||||
jstr, location = matches
|
||||
item.url=support.re.sub(r':\d+', '', location).replace('http://','https://')
|
||||
if jstr:
|
||||
jshe = 'var document = {}, location = {}'
|
||||
aesjs = str(support.match(host + '/aes.min.js').data)
|
||||
js_fix = 'window.toHex = window.toHex || function(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}'
|
||||
jsret = 'return document.cookie'
|
||||
key_data = js2py.eval_js( 'function (){ ' + jshe + '\n' + aesjs + '\n' + js_fix + '\n' + jstr + '\n' + jsret + '}' )()
|
||||
key = key_data.split(';')[0]
|
||||
|
||||
# save Key in settings
|
||||
config.set_setting('key', key, item.channel)
|
||||
|
||||
# set cookie
|
||||
headers['cookie'] = config.get_setting('key', item.channel)
|
||||
res = support.match(item, headers=headers, patron=r';\s*location.href=".*?(http[^"]+)"')
|
||||
if res.match:
|
||||
item.url= res.match.replace('http://','https://')
|
||||
data = support.match(item, headers=headers).data
|
||||
else:
|
||||
data = res.data
|
||||
|
||||
|
||||
#check that the key is still valid
|
||||
if 'document.cookie=' in data and item.count < 3:
|
||||
item.count += 1
|
||||
config.set_setting('key', '', item.channel)
|
||||
return get_data(item)
|
||||
return data
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
anime = ['/animelist?load_all=1&d=1',
|
||||
('ITA',['', 'submenu', '/filter?language%5B0%5D=1']),
|
||||
('SUB-ITA',['', 'submenu', '/filter?language%5B0%5D=0']),
|
||||
('Più Votati',['/toplist','menu', 'top']),
|
||||
('In Corso',['/animeincorso','peliculas','incorso']),
|
||||
('Ultimi Episodi',['/fetch_pages.php?request=episodes&d=1','peliculas','updated'])]
|
||||
@@ -62,7 +24,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.url = host + '/animelist?search=' + texto
|
||||
item.contentType = 'tvshow'
|
||||
try:
|
||||
@@ -76,7 +38,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
@@ -94,9 +56,28 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
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>'
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.insert(0, item.clone(title=support.typo('Tutti','bold'), url=item.url + item.args, action='peliculas'))
|
||||
return itemlist[:-1]
|
||||
return locals()
|
||||
|
||||
|
||||
def filter(item):
|
||||
itemlist = []
|
||||
matches = support.match(item.url, patron=r'<option value="(?P<value>[^"]+)"[^>]*>(?P<title>[^<]+)').matches
|
||||
for value, title in matches:
|
||||
itemlist.append(item.clone(title= support.typo(title,'bold'), url='{}{}&{}%5B0%5D={}'.format(host, item.args, item.parameter, value), action='peliculas', args='filter'))
|
||||
support.thumb(itemlist, genre=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
data=get_data(item)
|
||||
patronMenu = r'<div class="col-md-13 bg-dark-as-box-shadow p-2 text-white text-center">(?P<title>[^"<]+)<(?P<other>.*?)(?:"lista-top"|"clearfix")'
|
||||
action = 'peliculas'
|
||||
item.args = 'top'
|
||||
@@ -109,12 +90,10 @@ def menu(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
data = get_data(item)
|
||||
anime = True
|
||||
|
||||
deflang= 'Sub-ITA'
|
||||
action = 'check'
|
||||
|
||||
page = None
|
||||
post = "page=" + str(item.page if item.page else 1) if item.page > 1 else None
|
||||
|
||||
@@ -124,26 +103,37 @@ def peliculas(item):
|
||||
else:
|
||||
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
|
||||
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+)'
|
||||
typeContentDict = {'Movie':'movie', 'Episodio':'episode'} #item.contentType='episode'
|
||||
action = 'findvideos'
|
||||
def itemlistHook(itemlist):
|
||||
if page:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),page= page, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
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>[^"]+)"'
|
||||
def itemlistHook(itemlist):
|
||||
if item.nextpage: item.nextpage += 1
|
||||
else: item.nextpage = 2
|
||||
if page and item.nextpage < int(page):
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), url= '{}&page={}'.format(item.url, item.nextpage), infoLabels={}, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
pagination = ''
|
||||
if item.args == 'incorso':
|
||||
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>[^<]+))?<'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
movie = support.match(get_data(item), patron=r'Episodi:</b> (\d*) Movie')
|
||||
movie = support.match(item, patron=r'Episodi:</b> (\d*) Movie')
|
||||
if movie.match:
|
||||
episodes = episodios(item)
|
||||
if len(episodes) > 0:
|
||||
@@ -156,18 +146,17 @@ def check(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
data = get_data(item)
|
||||
if item.contentType != 'movie': anime = True
|
||||
patron = r'episodi-link-button">\s*<a href="(?P<url>[^"]+)"[^>]+>\s*(?P<title>[^<]+)</a>'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
page_data = ''
|
||||
titles =['Primario', 'Secondario', 'Alternativo Primario', 'Alternativo Secondario']
|
||||
url = support.match(get_data(item), patron=r'<a href="([^"]+)">[^>]+>[^>]+>G', headers=headers).match
|
||||
url = support.match(item, patron=r'<a href="([^"]+)">[^>]+>[^>]+>G', headers=headers).match
|
||||
urls = [url, url+'&extra=1', url+'&s=alt', url+'&s=alt&extra=1']
|
||||
links = []
|
||||
for i, url in enumerate(urls):
|
||||
|
||||
+13
-13
@@ -5,7 +5,7 @@
|
||||
|
||||
import requests, json, copy
|
||||
from core import support
|
||||
from specials import autorenumber
|
||||
from platformcode import autorenumber
|
||||
|
||||
try: from lib import cloudscraper
|
||||
except: from lib import cloudscraper
|
||||
@@ -46,12 +46,12 @@ def menu(item):
|
||||
if item.contentType == 'tvshow':
|
||||
itemlist += [item.clone(title=support.typo('In Corso','bold'), args=InCorso),
|
||||
item.clone(title=support.typo('Terminato','bold'), args=Terminato)]
|
||||
itemlist +=[item.clone(title=support.typo('Cerca...','bold'), action='search', thumbnail=support.thumb(thumb='search.png'))]
|
||||
itemlist +=[item.clone(title=support.typo('Cerca...','bold'), action='search', thumbnail=support.thumb('search'))]
|
||||
return itemlist
|
||||
|
||||
|
||||
def genres(item):
|
||||
support.log()
|
||||
support.info()
|
||||
# support.dbg()
|
||||
itemlist = []
|
||||
|
||||
@@ -63,7 +63,7 @@ def genres(item):
|
||||
return support.thumb(itemlist)
|
||||
|
||||
def years(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
from datetime import datetime
|
||||
@@ -77,7 +77,7 @@ def years(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
if not item.args:
|
||||
item.args = {'title':text}
|
||||
else:
|
||||
@@ -90,12 +90,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.url = host
|
||||
@@ -109,13 +109,13 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log(line)
|
||||
support.info(line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def news(item):
|
||||
support.log()
|
||||
support.info()
|
||||
item.contentType = 'tvshow'
|
||||
itemlist = []
|
||||
|
||||
@@ -140,7 +140,7 @@ def news(item):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
page = item.page if item.page else 0
|
||||
@@ -154,7 +154,7 @@ def peliculas(item):
|
||||
payload = json.dumps(item.args)
|
||||
records = requests.post(host + '/archivio/get-animes', headers=headers, data=payload).json()['records']
|
||||
# js = []
|
||||
# support.log(records)
|
||||
# support.info(records)
|
||||
# for record in records:
|
||||
# js += record
|
||||
for it in records:
|
||||
@@ -194,7 +194,7 @@ def peliculas(item):
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
title = 'Parte ' if item.type.lower() == 'movie' else 'Episodio '
|
||||
for it in item.episodes:
|
||||
@@ -219,5 +219,5 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
return support.server(item,itemlist=[item.clone(title=support.config.get_localized_string(30137), server='directo', action='play')])
|
||||
@@ -33,7 +33,7 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.search = texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
@@ -46,7 +46,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
|
||||
+48
-46
@@ -18,44 +18,44 @@ def order():
|
||||
# Seleziona l'ordinamento dei risultati
|
||||
return str(support.config.get_setting("order", __channel__))
|
||||
|
||||
def get_data(item, head=[]):
|
||||
global headers
|
||||
jstr = ''
|
||||
for h in head:
|
||||
headers[h[0]] = h[1]
|
||||
if not item.count: item.count = 0
|
||||
if not config.get_setting('key', item.channel):
|
||||
matches = support.match(item, patron=r'<script>(.*?location.href=".*?(http[^"]+)";)</').match
|
||||
if matches:
|
||||
jstr, location = matches
|
||||
item.url=support.re.sub(r':\d+', '', location).replace('http://','https://')
|
||||
if jstr:
|
||||
jshe = 'var document = {}, location = {}'
|
||||
aesjs = str(support.match(host + '/aes.min.js').data)
|
||||
js_fix = 'window.toHex = window.toHex || function(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}'
|
||||
jsret = 'return document.cookie'
|
||||
key_data = js2py.eval_js( 'function (){ ' + jshe + '\n' + aesjs + '\n' + js_fix + '\n' + jstr + '\n' + jsret + '}' )()
|
||||
key = key_data.split(';')[0]
|
||||
# def get_data(item, head=[]):
|
||||
# global headers
|
||||
# jstr = ''
|
||||
# for h in head:
|
||||
# headers[h[0]] = h[1]
|
||||
# if not item.count: item.count = 0
|
||||
# if not config.get_setting('key', item.channel):
|
||||
# matches = support.match(item, patron=r'<script>(.*?location.href=".*?(http[^"]+)";)</').match
|
||||
# if matches:
|
||||
# jstr, location = matches
|
||||
# item.url=support.re.sub(r':\d+', '', location).replace('http://','https://')
|
||||
# if jstr:
|
||||
# jshe = 'var document = {}, location = {}'
|
||||
# aesjs = str(support.match(host + '/aes.min.js').data)
|
||||
# js_fix = 'window.toHex = window.toHex || function(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}'
|
||||
# jsret = 'return document.cookie'
|
||||
# key_data = js2py.eval_js( 'function (){ ' + jshe + '\n' + aesjs + '\n' + js_fix + '\n' + jstr + '\n' + jsret + '}' )()
|
||||
# key = key_data.split(';')[0]
|
||||
|
||||
# save Key in settings
|
||||
config.set_setting('key', key, item.channel)
|
||||
# # save Key in settings
|
||||
# config.set_setting('key', key, item.channel)
|
||||
|
||||
# set cookie
|
||||
headers['cookie'] = config.get_setting('key', item.channel)
|
||||
res = support.match(item, headers=headers, patron=r';\s*location.href=".*?(http[^"]+)"')
|
||||
if res.match:
|
||||
item.url= res.match.replace('http://','https://')
|
||||
data = support.match(item, headers=headers).data
|
||||
else:
|
||||
data = res.data
|
||||
# # set cookie
|
||||
# headers['cookie'] = config.get_setting('key', item.channel)
|
||||
# res = support.match(item, headers=headers, patron=r';\s*location.href=".*?(http[^"]+)"')
|
||||
# if res.match:
|
||||
# item.url= res.match.replace('http://','https://')
|
||||
# data = support.match(item, headers=headers).data
|
||||
# else:
|
||||
# data = res.data
|
||||
|
||||
|
||||
#check that the key is still valid
|
||||
if 'document.cookie=' in data and item.count < 3:
|
||||
item.count += 1
|
||||
config.set_setting('key', '', item.channel)
|
||||
return get_data(item)
|
||||
return data
|
||||
# #check that the key is still valid
|
||||
# if 'document.cookie=' in data and item.count < 3:
|
||||
# item.count += 1
|
||||
# config.set_setting('key', '', item.channel)
|
||||
# return get_data(item)
|
||||
# return data
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -73,7 +73,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
data = get_data(item)
|
||||
# data = get_data(item)
|
||||
patronBlock = r'dropdown[^>]*>\s*Generi\s*<span.[^>]+>(?P<block>.*?)</ul>'
|
||||
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)</label>'
|
||||
|
||||
@@ -86,11 +86,11 @@ def genres(item):
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'submenu'
|
||||
data = get_data(item)
|
||||
# data = get_data(item)
|
||||
patronMenu=r'<button[^>]+>\s*(?P<title>[A-Za-z0-9]+)\s*<span.[^>]+>(?P<other>.*?)</ul>'
|
||||
def ItemItemlistHook(item, 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(thumb='search.png')))
|
||||
itemlist.append(item.clone(title=support.typo('Cerca...','bold'), action='search', search=True, thumbnail=support.thumb('search.png')))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@@ -107,7 +107,7 @@ def submenu(item):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
@@ -123,7 +123,7 @@ def newest(categoria):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
if item.search:
|
||||
item.url = host + '/filter?dub=' + item.args + '&keyword=' + texto + '&sort='
|
||||
else:
|
||||
@@ -143,19 +143,20 @@ def search(item, texto):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
anime=True
|
||||
# debug =True
|
||||
if item.args not in ['noorder', 'updated'] and not item.url[-1].isdigit(): item.url += order() # usa l'ordinamento di configura canale
|
||||
data = get_data(item)
|
||||
# data = get_data(item)
|
||||
if item.args == 'updated':
|
||||
data = get_data(item)
|
||||
# data = get_data(item)
|
||||
item.contentType='episode'
|
||||
patron=r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<lang>[^\)]+)\))?"[^>]+>[^>]+>\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?[^>]+>[^>]+>\s*<div class="ep">[^\d]+(?P<episode>\d+)[^<]*</div>'
|
||||
action='findvideos'
|
||||
else:
|
||||
patron= r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<year>\d+)\) )?(?:\((?P<lang>[^\)]+)\))?"[^>]+>[^>]+>(?:\s*<div class="(?P<l>[^"]+)">[^>]+>)?\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?'
|
||||
patron= r'<div class="inner">\s*<a href="(?P<url>[^"]+)" class[^>]+>\s*<img.*?src="(?P<thumb>[^"]+)" alt?="(?P<title>[^\("]+)(?:\((?P<year>\d+)\) )?(?:\((?P<lang>[^\)]+)\))?(?P<title2>[^"]+)?[^>]+>[^>]+>(?:\s*<div class="(?P<l>[^"]+)">[^>]+>)?\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?'
|
||||
action='episodios'
|
||||
|
||||
# Controlla la lingua se assente
|
||||
patronNext=r'</span></a><a href="([^"]+)"'
|
||||
patronNext=r'<a href="([^"]+)" class="[^"]+" id="go-next'
|
||||
typeContentDict={'movie':['movie', 'special']}
|
||||
typeActionDict={'findvideos':['movie', 'special']}
|
||||
def itemHook(item):
|
||||
@@ -174,7 +175,7 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
anime=True
|
||||
pagination = 50
|
||||
data = get_data(item)
|
||||
# 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>[^<]+)<'
|
||||
def itemHook(item):
|
||||
@@ -187,10 +188,11 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
import time
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
itemlist = []
|
||||
urls = []
|
||||
resp = support.match(get_data(item), headers=headers, patron=r'data-name="(\d+)">([^<]+)<')
|
||||
# resp = support.match(get_data(item), headers=headers, patron=r'data-name="(\d+)">([^<]+)<')
|
||||
resp = support.match(item, headers=headers, patron=r'data-name="(\d+)">([^<]+)<')
|
||||
data = resp.data
|
||||
for ID, name in resp.matches:
|
||||
if not item.number: item.number = support.match(item.title, patron=r'(\d+) -').match
|
||||
|
||||
@@ -39,17 +39,17 @@ def genres(item):
|
||||
def select(item):
|
||||
item.data = support.match(item).data
|
||||
if 'continua con il video' in item.data.lower():
|
||||
support.log('select = ### è un film ###')
|
||||
support.info('select = ### è un film ###')
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
else:
|
||||
support.log('select = ### è una serie ###')
|
||||
support.info('select = ### è una serie ###')
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/?s=' + text
|
||||
item.args = 'search'
|
||||
@@ -59,7 +59,7 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -107,7 +107,7 @@ def peliculas(item):
|
||||
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>[^<]+)))?'
|
||||
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> <div[^>]+>(?P<title>[^\(\[<]+)(?:\[(?P<quality1>HD)\])?[ ]?(?:\(|\[)?(?P<lang>Sub-ITA)?(?:\)|\])?[ ]?(?:\[(?P<quality>.+?)\])?[ ]?(?:\((?P<year>\d+)\))?'
|
||||
|
||||
patronNext = r'<a href="([^"]+)" >Pagina'
|
||||
# debug = True
|
||||
@@ -148,7 +148,7 @@ def findvideos(item):
|
||||
data = ''
|
||||
from lib.unshortenit import unshorten_only
|
||||
for link in links:
|
||||
support.log('URL=',link)
|
||||
support.info('URL=',link)
|
||||
url, c = unshorten_only(link.replace('#', 'speedvideo.net'))
|
||||
data += url + '\n'
|
||||
return support.server(item, data)
|
||||
|
||||
@@ -35,12 +35,12 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
return peliculas(item)
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
@@ -80,7 +80,7 @@ def check(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log('EPISODIOS ', item.data)
|
||||
support.info('EPISODIOS ', item.data)
|
||||
data = ''
|
||||
matches = item.data
|
||||
season = 1
|
||||
|
||||
+14
-12
@@ -55,7 +55,7 @@ def menu(item):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
|
||||
item = support.Item()
|
||||
try:
|
||||
@@ -71,15 +71,16 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(item.url, "search", text)
|
||||
|
||||
logger.info(item, "search", text)
|
||||
if item.contentType == 'tvshow': item.url = host + '/serietv/'
|
||||
else: item.url = host
|
||||
try:
|
||||
item.url = item.url + "/?s=" + text.replace(' ', '+')
|
||||
item.url = item.url + "?s=" + text.replace(' ', '+')
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
@@ -100,6 +101,7 @@ def peliculas(item):
|
||||
# debug= True
|
||||
if 'newest' in item.args:
|
||||
if '/serietv/' not in item.url:
|
||||
# debug = True
|
||||
pagination = ''
|
||||
patronBlock = r'Ultimi 100 film [^:]+:(?P<block>.*?)<\/td>'
|
||||
patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||
@@ -127,7 +129,7 @@ def peliculas(item):
|
||||
def episodios(item):
|
||||
# support.dbg()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
support.log(data)
|
||||
support.info(data)
|
||||
if 'TUTTA LA ' in data:
|
||||
folderUrl = scrapertools.find_single_match(data, r'TUTTA LA \w+\s+(?:–|-)\s+<a href="?([^" ]+)')
|
||||
data = httptools.downloadpage(folderUrl).data
|
||||
@@ -170,14 +172,14 @@ def findvideos(item):
|
||||
|
||||
def load_links(itemlist, re_txt, desc_txt, quality=""):
|
||||
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
|
||||
support.log('STREAMING', streaming)
|
||||
support.log('STREAMING=', streaming)
|
||||
support.info('STREAMING', streaming)
|
||||
support.info('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.log()
|
||||
support.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
@@ -210,7 +212,7 @@ def findvideos(item):
|
||||
|
||||
def findvid_serie(item):
|
||||
def load_vid_series(html, item, itemlist, blktxt):
|
||||
support.log('HTML',html)
|
||||
support.info('HTML',html)
|
||||
# Estrae i contenuti
|
||||
matches = support.match(html, patron=r'<a href=(?:")?([^ "]+)[^>]+>(?!<!--)(.*?)(?:</a>|<img)').matches
|
||||
for url, server in matches:
|
||||
@@ -218,7 +220,7 @@ def findvid_serie(item):
|
||||
if 'swzz' in item.url: item.url = support.swzz_get_url(item)
|
||||
itemlist.append(item)
|
||||
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
@@ -238,5 +240,5 @@ def findvid_serie(item):
|
||||
|
||||
|
||||
def play(item):
|
||||
support.log()
|
||||
support.info()
|
||||
return servertools.find_video_items(item, data=item.url)
|
||||
|
||||
@@ -89,13 +89,13 @@ def episodios(item):
|
||||
data=item.data
|
||||
# debugBlock=True
|
||||
if item.args == 'anime':
|
||||
support.log("Anime :", item)
|
||||
support.info("Anime :", item)
|
||||
# blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555', 'Cloudvideo']
|
||||
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
|
||||
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
||||
item.contentType = 'tvshow'
|
||||
else:# item.extra == 'serie':
|
||||
support.log("Serie :", item)
|
||||
support.info("Serie :", item)
|
||||
patron = r'(?:>| )(?P<episode>\d+(?:x|×|×)\d+)[;]?[ ]?(?:(?P<title>[^<–-]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br /|</a></p|$)'
|
||||
patronBlock = r'>(?:[^<]+[Ss]tagione\s|[Ss]tagione [Uu]nica)(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:<strong|<div class="at-below)'
|
||||
item.contentType = 'tvshow'
|
||||
@@ -118,7 +118,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(item.url,texto)
|
||||
support.info(item.url,texto)
|
||||
texto = texto.replace(' ', '+')
|
||||
item.url = host + "/?s=" + texto
|
||||
# item.contentType = 'tv'
|
||||
@@ -129,11 +129,11 @@ def search(item, texto):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.args = 'newest'
|
||||
@@ -147,13 +147,13 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('newest log: ', (line))
|
||||
support.info('newest log: ', (line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def check(item):
|
||||
support.log()
|
||||
support.info()
|
||||
data = support.match(item.url, headers=headers).data
|
||||
if data:
|
||||
blockAnime = support.match(data, patron=r'<div id="container" class="container">(.+?<div style="margin-left)').match
|
||||
@@ -175,6 +175,6 @@ def check(item):
|
||||
return findvideos(item)
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
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)
|
||||
|
||||
@@ -34,7 +34,7 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
item.args = 'noorder'
|
||||
item.url = host + '/ricerca/type_ALL/ricerca_' + text
|
||||
item.contentType = 'movie'
|
||||
@@ -62,7 +62,7 @@ def peliculas(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
matches = support.match(item, patron=r'filename: "(.*?)"').matches
|
||||
|
||||
@@ -10,7 +10,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
|
||||
anime = ['/search?typeY=tv',
|
||||
('Movie', ['/search?typeY=movie', 'peliculas', '', 'movie']),
|
||||
@@ -34,7 +34,7 @@ def menu(item):
|
||||
patronMenu = r'<a class="[^"]+" data-state="[^"]+" (?P<other>[^>]+)>[^>]+></i>[^>]+></i>[^>]+></i>(?P<title>[^>]+)</a>'
|
||||
|
||||
def itemHook(item):
|
||||
support.log(item.type)
|
||||
support.info(item.type)
|
||||
for Type, ID in support.match(item.other, patron=r'data-type="([^"]+)" data-id="([^"]+)"').matches:
|
||||
item.url = host + '/search?' + Type + 'Y=' + ID
|
||||
return item
|
||||
@@ -42,7 +42,7 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/search/' + text
|
||||
@@ -53,12 +53,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
@@ -110,7 +110,7 @@ def episodios(item):
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
support.log()
|
||||
support.info()
|
||||
# support.dbg()
|
||||
|
||||
matches = support.match(item, patron=r'href="([^"]+)"', patronBlock=r'<div style="white-space: (.*?)<div id="main-content"')
|
||||
@@ -124,7 +124,7 @@ def findvideos(item):
|
||||
itemlist.append(item.clone(action="play", title='VVVVID', url=support.match(matches.data, patron=r'(http://www.vvvvid[^"]+)').match, server='vvvvid'))
|
||||
else:
|
||||
# matches.matches.sort()
|
||||
support.log('VIDEO')
|
||||
support.info('VIDEO')
|
||||
for url in matches.matches:
|
||||
lang = url.split('/')[-2]
|
||||
if 'ita' in lang.lower():
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ def menu(item):
|
||||
return locals()
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.info()
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "documentales":
|
||||
@@ -50,7 +50,7 @@ def newest(categoria):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
@@ -133,7 +133,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
if item.args == 'raccolta' or item.contentType == 'episode':
|
||||
return support.server(item, item.url)
|
||||
else:
|
||||
|
||||
@@ -17,7 +17,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
support.info()
|
||||
tvshow = []
|
||||
anime = ['/category/anime-cartoni-animati/']
|
||||
mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']),
|
||||
@@ -57,7 +57,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
item.contentType = 'tvshow'
|
||||
@@ -69,12 +69,12 @@ def search(item, texto):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log(line)
|
||||
support.info(line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
@@ -88,12 +88,12 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("{0}".format(line))
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
return support.server(item, item.url)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"""
|
||||
from core import support, httptools, scrapertools
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
@@ -42,7 +42,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
# support.dbg()
|
||||
deflang = 'Sub-ITA'
|
||||
|
||||
@@ -67,7 +67,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
#support.dbg()
|
||||
|
||||
deflang = 'Sub-ITA'
|
||||
@@ -82,7 +82,7 @@ def episodios(item):
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log()
|
||||
support.info()
|
||||
#support.dbg()
|
||||
|
||||
action = 'peliculas'
|
||||
@@ -99,7 +99,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '?s=' + text
|
||||
try:
|
||||
@@ -110,12 +110,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log('search log:', line)
|
||||
info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
if categoria == 'series':
|
||||
@@ -132,14 +132,14 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('newest log: ', line)
|
||||
support.info('newest log: ', line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos ->', item)
|
||||
support.info('findvideos ->', item)
|
||||
itemlist = []
|
||||
patronBlock = '<div class="entry-content">(?P<block>.*)<footer class="entry-footer">'
|
||||
patron = r'<a href="([^"]+)">'
|
||||
|
||||
@@ -41,7 +41,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
if item.args == 'search':
|
||||
action = ''
|
||||
@@ -88,7 +88,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<div class="row">(?P<block>.*?)<section class="main-content">'
|
||||
@@ -98,7 +98,7 @@ def episodios(item):
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'peliculas'
|
||||
@@ -115,7 +115,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/search/?s=' + text
|
||||
@@ -126,11 +126,11 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
support.info('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -146,11 +146,11 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log({0}.format(line))
|
||||
support.info({0}.format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
return support.server(item)
|
||||
|
||||
@@ -33,7 +33,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
if item.args != 'newest':
|
||||
patronBlock = r'<ul class="posts">(?P<block>.*)<\/ul>'
|
||||
@@ -94,21 +94,21 @@ def genres(item):
|
||||
|
||||
|
||||
def select(item):
|
||||
support.log()
|
||||
support.info()
|
||||
patron=r'class="taxonomy category" ><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.log('select = ### è una serie ###')
|
||||
support.info('select = ### è una serie ###')
|
||||
item.contentType='tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
support.log('select = ### è un movie ###')
|
||||
support.info('select = ### è un movie ###')
|
||||
item.contentType='movie'
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log()
|
||||
support.info()
|
||||
item.url = host + "/?s=" + texto
|
||||
item.contentType = 'episode'
|
||||
item.args = 'search'
|
||||
@@ -118,12 +118,12 @@ def search(item, texto):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -144,7 +144,7 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("{0}".format(line))
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# possibilità di miglioramento: inserire menu per genere - lista serie tv e gestire le novità
|
||||
|
||||
from core import support
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
@@ -51,7 +51,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
item.contentType = 'tvshow'
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
@@ -61,7 +61,7 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log('search log:', line)
|
||||
info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
@@ -40,7 +40,7 @@ def mainlist(item):
|
||||
##@support.scrape
|
||||
##def peliculas(item):
|
||||
#### import web_pdb; web_pdb.set_trace()
|
||||
## log('peliculas ->\n', item)
|
||||
## info('peliculas ->\n', item)
|
||||
##
|
||||
## action = 'episodios'
|
||||
## block = r'(?P<block>.*?)<div\s+class="btn btn-lg btn-default btn-load-other-series">'
|
||||
@@ -77,7 +77,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
## import web_pdb; web_pdb.set_trace()
|
||||
log('peliculas ->\n', item)
|
||||
info('peliculas ->\n', item)
|
||||
|
||||
action = 'episodios'
|
||||
blacklist = ['DMCA']
|
||||
@@ -122,7 +122,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
info()
|
||||
|
||||
action = 'findvideos'
|
||||
patron = r'<div class="number-episodes-on-img">\s?\d+.\d+\s?(?:\((?P<lang>[a-zA-Z\-]+)\))?</div>.+?(?:<span class="pull-left bottom-year">(?P<title2>[^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<[^>]+>[^>]+>[^>]+>\s?)?<span(?: meta-nextep="[^"]+")? class="[^"]+" meta-serie="(?P<title>[^"]+)" meta-stag="(?P<season>\d+)" meta-ep="(?P<episode>\d+)" meta-embed="(?P<url>[^>]+)">'
|
||||
@@ -137,7 +137,7 @@ def episodios(item):
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
log()
|
||||
info()
|
||||
|
||||
action = 'peliculas'
|
||||
patron = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
||||
@@ -148,7 +148,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
log(text)
|
||||
info(text)
|
||||
item.url = host + "/?s=" + text
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'search'
|
||||
@@ -158,11 +158,11 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
info("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
log()
|
||||
info()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.contentType= 'tvshow'
|
||||
@@ -177,12 +177,12 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("{0}".format(line))
|
||||
info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log('--->', item)
|
||||
info('--->', item)
|
||||
return support.server(item, item.url)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
# possibilità di miglioramento: gestire le novità (sezione Ultimi episodi sul sito)
|
||||
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from core import support
|
||||
from platformcode import config
|
||||
|
||||
@@ -40,7 +40,7 @@ def episodios(item):
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
log(text)
|
||||
info(text)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/?s=" + text
|
||||
@@ -50,10 +50,10 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
info("%s" % line)
|
||||
|
||||
return []
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos', item)
|
||||
support.info('findvideos', item)
|
||||
return support.server(item, headers=headers)
|
||||
+1
-1
@@ -42,7 +42,7 @@ def genre(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
item.url = host + '/?s=' + text
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
@@ -11,7 +11,7 @@ def findhost():
|
||||
return url[:-1] if url.endswith('/') else url
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
support.log('HOST',host)
|
||||
support.info('HOST',host)
|
||||
# host = 'https://ilcorsaronero.xyz'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@@ -64,7 +64,7 @@ def peliculas(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(item, text)
|
||||
support.info(item, text)
|
||||
if 'all' in item.args:
|
||||
item.url += text
|
||||
else:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
from core import support
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
@@ -15,7 +15,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
|
||||
film = ['/film/',
|
||||
('Generi',['', 'genres', 'genres']),
|
||||
@@ -46,7 +46,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
info()
|
||||
# debug = True
|
||||
|
||||
if item.args == 'search':
|
||||
@@ -96,7 +96,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
info()
|
||||
|
||||
patronBlock = r'<h1>.*?[ ]?(?:\[(?P<lang>.+?\]))?</h1>.+?<div class="se-a" '\
|
||||
'style="display:block"><ul class="episodios">(?P<block>.*?)</ul>'\
|
||||
@@ -109,7 +109,7 @@ def episodios(item):
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
log(item)
|
||||
info(item)
|
||||
|
||||
action='peliculas'
|
||||
if item.args == 'genres':
|
||||
@@ -125,7 +125,7 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
log(text)
|
||||
info(text)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/search/" + text
|
||||
@@ -135,12 +135,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
info("%s" % line)
|
||||
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
@@ -161,14 +161,14 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("{0}".format(line))
|
||||
info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
info()
|
||||
matches = support.match(item, patron=[r'class="metaframe rptss" src="([^"]+)"',r' href="#option-\d">([^\s]+)\s*([^\s]+)']).matches
|
||||
itemlist = []
|
||||
list_url = []
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "ilgeniodellostreaming_cam",
|
||||
"name": "IlGenioDelloStreaming CAM",
|
||||
"active": true,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "ilgeniodellostreaming.png",
|
||||
"banner": "ilgeniodellostreaming.png",
|
||||
"categories": ["movie"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per ilgeniodellostreaming_cam
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
from core import support
|
||||
from core.support import info
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['/film/',
|
||||
('In Sala', ['', 'peliculas', 'sala']),
|
||||
('Generi',['', 'genres', 'genres']),
|
||||
('Per Lettera',['/catalog/all', 'genres', 'az']),
|
||||
('Anni',['', 'genres', 'year'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.args == 'sala':
|
||||
patronBlock = r'insala(?P<block>.*?)<header>'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})'
|
||||
elif item.args == 'az':
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>.*?<span class="labelimdb">(?P<rating>[^>]+)<'
|
||||
else:
|
||||
patron = r'<img src="(?P<thumb>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[^<]+)[^>]+>[^>]+>(?P<quality>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<plot>[^<]+)<[^>]+>'
|
||||
|
||||
patronNext = 'href="([^>]+)">»'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
action='peliculas'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<div class="sidemenu">\s*<h2>Genere</h2>(?P<block>.*?)</ul'
|
||||
elif item.args == 'year':
|
||||
item.args = 'genres'
|
||||
patronBlock = r'<div class="sidemenu">\s*<h2>Anno di uscita</h2>(?P<block>.*?)</ul'
|
||||
elif item.args == 'az':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
|
||||
patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
info(text)
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/search/" + text
|
||||
try:
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
info("%s" % line)
|
||||
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film/'
|
||||
try:
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
info()
|
||||
return support.server(item)
|
||||
@@ -25,7 +25,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'update']),
|
||||
@@ -37,7 +37,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
action = 'episodios'
|
||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\
|
||||
@@ -54,7 +54,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\
|
||||
'<div class="su-spoiler-content".*?)<div class="clearfix">'
|
||||
@@ -70,7 +70,7 @@ def episodios(item):
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
action = 'peliculas'
|
||||
patron = r'<li class="cat-item.*?href="(?P<url>[^"]+)".*?>(?P<title>.*?)</a>'
|
||||
@@ -79,7 +79,7 @@ def category(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log("s=", texto)
|
||||
support.info("s=", texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
item.contentType = 'tvshow'
|
||||
try:
|
||||
@@ -88,12 +88,12 @@ def search(item, texto):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log("newest", categoria)
|
||||
support.info("newest", categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -111,14 +111,14 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("{0}".format(line))
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
if item.args == 'update':
|
||||
itemlist = []
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def play(item):
|
||||
support.log()
|
||||
support.info()
|
||||
data = support.match(item).data
|
||||
match = support.match(data, patron='/content/entry/data/(.*?).mp4').match
|
||||
if match:
|
||||
|
||||
+11
-11
@@ -49,7 +49,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
item.search = text
|
||||
if not item.args:
|
||||
item.contentType = 'undefined'
|
||||
@@ -64,7 +64,7 @@ def search(item, text):
|
||||
return itemlist
|
||||
|
||||
def menu(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = [item.clone(title=support.typo(item.args[0],'bullet bold'), url='', action='peliculas')]
|
||||
if item.url:
|
||||
json = get_from_id(item)
|
||||
@@ -74,7 +74,7 @@ def menu(item):
|
||||
return itemlist
|
||||
|
||||
def live(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['entries']
|
||||
for it in json:
|
||||
@@ -99,7 +99,7 @@ def live(item):
|
||||
return support.thumb(itemlist, live=True)
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
contentType = ''
|
||||
json = get_programs(item)
|
||||
@@ -144,7 +144,7 @@ def peliculas(item):
|
||||
return itemlist
|
||||
|
||||
def epmenu(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
entries = current_session.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-brands?byCustomValue={brandId}{' + item.urls + '}').json()['entries']
|
||||
for entry in entries:
|
||||
@@ -159,7 +159,7 @@ def epmenu(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
episode = ''
|
||||
|
||||
@@ -188,12 +188,12 @@ def episodios(item):
|
||||
return sorted(itemlist, key=lambda it: it.title)
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = [support.Item(server = 'directo', title = 'Direct', url = item.urls, action = 'play')]
|
||||
return support.server(item, itemlist=itemlist, Download=False)
|
||||
|
||||
def play(item):
|
||||
support.log()
|
||||
support.info()
|
||||
if not item.urls: urls = item.url
|
||||
else: urls = item.urls
|
||||
for url in urls:
|
||||
@@ -209,13 +209,13 @@ def play(item):
|
||||
return support.servertools.find_video_items(item, data=data)
|
||||
|
||||
def subBrand(json):
|
||||
support.log()
|
||||
support.info()
|
||||
subBrandId = current_session.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-brands?byCustomValue={brandId}{' + json + '}').json()['entries'][-1]['mediasetprogram$subBrandId']
|
||||
json = current_session.get('https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs?byCustomValue={subBrandId}{' + subBrandId + '}').json()['entries']
|
||||
return json
|
||||
|
||||
def get_from_id(item):
|
||||
support.log()
|
||||
support.info()
|
||||
json = current_session.get(entry.format(id=item.url)).json()
|
||||
if 'components' in json:
|
||||
id = quote(",".join(json["components"]))
|
||||
@@ -225,7 +225,7 @@ def get_from_id(item):
|
||||
return {}
|
||||
|
||||
def get_programs(item, ret=[], args={}):
|
||||
support.log()
|
||||
support.info()
|
||||
hasMore = False
|
||||
if not args:
|
||||
if item.url:
|
||||
|
||||
@@ -24,7 +24,7 @@ def mainlist(item):
|
||||
patronBlock = r'<ul class="dropdown-menu(?P<block>.*?)</ul> </div'
|
||||
patron = r'<a href="(?P<url>[^"]+)"(?: class="")?>(?P<title>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
item.thumbnail = support.thumb('music')
|
||||
item.contentType = 'music'
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
@@ -36,7 +36,7 @@ def mainlist(item):
|
||||
contentType='music',
|
||||
url=item.url,
|
||||
action='search',
|
||||
thumbnail=support.thumb(thumb='search.png')))
|
||||
thumbnail=support.thumb('search')))
|
||||
|
||||
support.channel_config(item, itemlist)
|
||||
return itemlist
|
||||
@@ -56,7 +56,7 @@ def findvideos(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
item.url = host + '/search.php?keywords=' + text + '&video-id='
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
@@ -35,7 +35,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
if item.contentType == 'movie' or item.extra == 'movie':
|
||||
action = 'findvideos'
|
||||
else:
|
||||
@@ -53,7 +53,7 @@ def search(item, text):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "series":
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": "paramount",
|
||||
"name": "Paramount Network",
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "paramount.png",
|
||||
"banner": "paramount.png",
|
||||
"categories": ["movie", "tvshow", "documentary", "live"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"default_off": ["include_in_global_search"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "pagination",
|
||||
"type": "list",
|
||||
"label": "Elementi per pagina",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["20", "40", "60", "80", "100"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Paramount Network
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support, jsontools
|
||||
from platformcode import autorenumber
|
||||
|
||||
# host = support.config.get_channel_url()
|
||||
host = 'https://www.paramountnetwork.it'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['/dl/RaiPlay/2016/PublishingBlock-9a2ff311-fcf0-4539-8f8f-c4fee2a71d58.html?json', 'live'])]
|
||||
film = []
|
||||
tvshow = []
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action='peliculas'
|
||||
blacklist=['Tutti']
|
||||
patronMenu = r'<a data-display-name="Link" href="(?P<url>[^"]+)" class="[^"]+">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info(text)
|
||||
|
||||
item.search = text.replace(' ','+')
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def live(item):
|
||||
itemlist=[]
|
||||
urls=[]
|
||||
matches = support.match(host, patron=r'(/diretta-tv/[^"]+)"[^>]+>([^ ]+)').matches
|
||||
from datetime import date
|
||||
today = date.today()
|
||||
channels = jsontools.load(support.match(host + '/api/more/tvschedule/' + str(today.year) + str(today.month) + str(today.day)).data)['channels']
|
||||
ch_dict = {}
|
||||
for channel in channels:
|
||||
ch_dict[channel['label']] = channel['channelId']
|
||||
for url, title in matches:
|
||||
if url not in urls:
|
||||
urls.append(url)
|
||||
info = jsontools.load(support.match(host +'/api/on-air?channelId=' + ch_dict[title]).data)
|
||||
support.info(info)
|
||||
plot= '[B]' + info['seriesTitle'] +'[/B]\n' + info['description'] if 'seriesTitle' in info else ''
|
||||
itemlist.append(item.clone(title=support.typo(title,'bold'), contentTitle=title, url=host+url, plot=plot, action='findvideos'))
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
itemlist = []
|
||||
if item.contentType == 'movie':
|
||||
Type = 'Movie'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
Type = 'Series'
|
||||
action = 'episodios'
|
||||
if not item.page: item.page = 1
|
||||
pagination_values = [20, 40, 60, 80, 100]
|
||||
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']
|
||||
|
||||
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))
|
||||
itemlist.sort(key=lambda item: item.fulltitle)
|
||||
if not item.search:
|
||||
itlist = []
|
||||
for i, it in enumerate(itemlist):
|
||||
if pagination and (item.page - 1) * pagination > i and not item.search: continue # pagination
|
||||
if pagination and i >= item.page * pagination and not item.search: break # pagination
|
||||
itlist.append(it)
|
||||
if pagination and len(itemlist) >= item.page * pagination and not item.search:
|
||||
itlist.append(item.clone(channel=item.channel, action = 'peliculas', title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), page=item.page + 1, thumbnail=support.thumb()))
|
||||
itemlist = itlist
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
def load_more(url):
|
||||
second_url = host if url.startswith('/') else '' + url.replace('\u002F','/').replace('%5C','/')
|
||||
new_data = support.match(host + second_url).data
|
||||
match = support.scrapertools.decodeHtmlentities(support.match(new_data, headers=headers, patron=r'"items":([^\]]+])').match.replace('\x01','l').replace('\x02','a'))
|
||||
return jsontools.load(match)
|
||||
|
||||
itemlist = []
|
||||
data = []
|
||||
page_data = support.match(item.url).data
|
||||
seasons = support.match(page_data, patron=r'href="([^"]+)"[^>]+>Stagione\s*\d+').matches
|
||||
more = support.match(page_data, patron=r'loadingTitle":[^,]+,"url":"([^"]+)"').match
|
||||
data = jsontools.load(support.scrapertools.decodeHtmlentities(support.match(page_data, patron=r'"isEpisodes":[^,]+,"items":(.*?),"as"').match))
|
||||
|
||||
if data:
|
||||
if more:
|
||||
data += load_more(more)
|
||||
if seasons:
|
||||
for url in seasons:
|
||||
new_data = support.match(host + url).data
|
||||
data += jsontools.load(support.scrapertools.decodeHtmlentities(support.match(new_data, patron=r'isEpisodes":[^,]+,"items":(.*?),"as"').match.replace('\x01','l').replace('\x02','a')))
|
||||
match = support.match(new_data, patron=r'loadingTitle":[^,]+,"url":"([^"]+)"').match
|
||||
if match and match != load_more:
|
||||
data += load_more(match)
|
||||
|
||||
for it in data:
|
||||
if 'text' in it['meta']['header']['title']:
|
||||
se = it['meta']['header']['title']['text']
|
||||
s = support.match(se, patron=r'S\s*(?P<season>\d+)').match
|
||||
e = support.match(se, patron=r'E\s*(?P<episode>\d+)').match
|
||||
if not e: e = support.match(it['meta']['subHeader'], patron=r'(\d+)').match
|
||||
title = support.typo((s + 'x' if s else 'Episodio ') + e.zfill(2) + ' - ' + it['meta']['subHeader'],'bold')
|
||||
else:
|
||||
s = e = '0'
|
||||
title = support.typo(it['meta']['header']['title'],'bold')
|
||||
itemlist.append(
|
||||
item.clone(title=title,
|
||||
season=int(s) if s else '',
|
||||
episode=int(e),
|
||||
url=host + it['url'] if it['url'].startswith('/') else it['url'],
|
||||
thumbnail=it['media']['image']['url'],
|
||||
fanart=it['media']['image']['url'],
|
||||
plot=it['meta']['description'],
|
||||
contentType='episode',
|
||||
action='findvideos'))
|
||||
|
||||
itemlist.sort(key=lambda item: (item.season, item.episode))
|
||||
autorenumber.renumber(itemlist, item, 'bold')
|
||||
return support.videolibrary(itemlist, item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
qualities = []
|
||||
|
||||
mgid = support.match(item, patron=r'uri":"([^"]+)"').match
|
||||
url = 'https://media.mtvnservices.com/pmt/e1/access/index.html?uri=' + mgid + '&configtype=edge&ref=' + item.url
|
||||
ID, rootUrl = support.match(url, patron=[r'"id":"([^"]+)",',r'brightcove_mediagenRootURL":"([^"]+)"']).matches
|
||||
url = jsontools.load(support.match(rootUrl.replace('&device={device}','').format(uri = ID)).data)['package']['video']['item'][0]['rendition'][0]['src']
|
||||
video_urls = support.match(url, patron=r'RESOLUTION=(\d+x\d+).*?(http[^ ]+)').matches
|
||||
for quality, url in video_urls:
|
||||
if quality not in qualities:
|
||||
qualities.append(quality)
|
||||
itemlist.append(item.clone(title=support.config.get_localized_string(30137), server='directo', action='play', url=url, quality=quality))
|
||||
itemlist.sort(key=lambda item: item.quality)
|
||||
return support.server(item, itemlist=itemlist, Download=False)
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
from core import support
|
||||
from core.support import config, log
|
||||
from core.support import config, info
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
@@ -23,7 +23,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
info(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
@@ -36,7 +36,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
|
||||
+9
-9
@@ -36,7 +36,7 @@ def mainlist(item):
|
||||
return locals()
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.info()
|
||||
item = Item()
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
@@ -47,7 +47,7 @@ def newest(categoria):
|
||||
return peliculas(item)
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
data = support.match(item.url, headers=headers).data
|
||||
@@ -68,7 +68,7 @@ def peliculas(item):
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
@@ -84,7 +84,7 @@ def episodios(item):
|
||||
return itemlist
|
||||
|
||||
def get_season(item, seas_url, seasonNumber):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(seas_url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
@@ -98,7 +98,7 @@ def get_season(item, seas_url, seasonNumber):
|
||||
return itemlist[::-1]
|
||||
|
||||
def search(item, texto):
|
||||
support.log(item.url, "search", texto)
|
||||
support.info(item.url, "search", texto)
|
||||
itemlist=[]
|
||||
try:
|
||||
item.url = host + "/api/movies?originalTitle="+texto+"&translations.name=" +texto
|
||||
@@ -122,7 +122,7 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
def search_movie_by_genre(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(item.url, headers=headers).data
|
||||
json_object = jsontools.load(data)
|
||||
@@ -135,7 +135,7 @@ def search_movie_by_genre(item):
|
||||
return support.thumb(itemlist, True)
|
||||
|
||||
def search_movie_by_year(item):
|
||||
support.log()
|
||||
support.info()
|
||||
now = datetime.datetime.now()
|
||||
year = int(now.year)
|
||||
itemlist = []
|
||||
@@ -150,7 +150,7 @@ def search_movie_by_year(item):
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
try:
|
||||
data = support.match(item.url, headers=headers).data
|
||||
@@ -171,7 +171,7 @@ def findvideos(item):
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
def get_itemlist_element(element,item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist=[]
|
||||
contentSerieName = ''
|
||||
contentTitle =''
|
||||
|
||||
@@ -38,7 +38,7 @@ def menu(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + '/search/keyword/' + text
|
||||
@@ -52,12 +52,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.url = host
|
||||
@@ -109,6 +109,6 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
# match = support.match(item, patron='wstream', debug=True)
|
||||
return support.server(item)
|
||||
|
||||
+18
-18
@@ -38,7 +38,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def menu(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = [item.clone(title = support.typo('Tutti','bullet bold'), action = 'peliculas'),
|
||||
item.clone(title = support.typo('Generi','submenu'), args = 'genre', action = 'submenu'),
|
||||
item.clone(title = support.typo('A-Z','submenu'), args = 'az', action = 'submenu'),
|
||||
@@ -48,7 +48,7 @@ def menu(item):
|
||||
|
||||
|
||||
def learning(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist =[]
|
||||
json = current_session.get(item.url).json()['contents']
|
||||
for key in json:
|
||||
@@ -58,7 +58,7 @@ def learning(item):
|
||||
|
||||
|
||||
def submenu(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['contents'][-1]['contents']
|
||||
if item.args == 'az':
|
||||
@@ -76,7 +76,7 @@ def submenu(item):
|
||||
|
||||
|
||||
def replay_menu(item):
|
||||
support.log()
|
||||
support.info()
|
||||
import datetime, xbmc
|
||||
|
||||
# create day and month list
|
||||
@@ -91,14 +91,14 @@ def replay_menu(item):
|
||||
today = datetime.date.today()
|
||||
for d in range(7):
|
||||
day = today - datetime.timedelta(days=d)
|
||||
support.log(day)
|
||||
support.info(day)
|
||||
itemlist.append(item.clone(action = 'replay_channels', date = day.strftime("%d-%m-%Y"),
|
||||
title = support.typo(days[int(day.strftime("%w"))] + " " + day.strftime("%d") + " " + months[int(day.strftime("%m"))-1], 'bold')))
|
||||
return itemlist
|
||||
|
||||
|
||||
def replay_channels(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['dirette']
|
||||
for key in json:
|
||||
@@ -108,18 +108,18 @@ def replay_channels(item):
|
||||
|
||||
|
||||
def replay(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()[item.fulltitle][0]['palinsesto'][0]['programmi']
|
||||
for key in json:
|
||||
support.log('KEY=',key)
|
||||
support.info('KEY=',key)
|
||||
if key and key['pathID']: itemlist.append(item.clone(thumbnail = getUrl(key['images']['landscape']), fanart = getUrl(key['images']['landscape']), url = getUrl(key['pathID']), fulltitle = key['name'], show = key['name'],
|
||||
title = support.typo(key['timePublished'], 'color kod bold') + support.typo(' | ' + key['name'], ' bold'), plot = key['testoBreve'], action = 'findvideos'))
|
||||
return itemlist
|
||||
|
||||
def search(item, text):
|
||||
# support.dbg()
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist =[]
|
||||
try:
|
||||
if item.url != host:
|
||||
@@ -153,12 +153,12 @@ def Type(item):
|
||||
|
||||
|
||||
def live(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist =[]
|
||||
info={}
|
||||
json = current_session.get(item.url).json()['dirette']
|
||||
onAir = current_session.get(onair).json()['on_air']
|
||||
support.log(onAir)
|
||||
support.info(onAir)
|
||||
for key in onAir:
|
||||
channel = key['channel']
|
||||
info[channel] = {}
|
||||
@@ -174,7 +174,7 @@ def live(item):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
keys = []
|
||||
key_list = []
|
||||
@@ -222,7 +222,7 @@ def peliculas(item):
|
||||
|
||||
|
||||
def select(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(item.url).json()['blocks']
|
||||
for key in json:
|
||||
@@ -234,7 +234,7 @@ def select(item):
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
if type(item.url) in [list, dict] and len(item.url) > 1 and ('name' in item.url[0] and 'stagione' not in item.url[0]['name'].lower()):
|
||||
for key in item.url:
|
||||
@@ -276,7 +276,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
if item.url.endswith('json'):
|
||||
json = current_session.get(item.url).json()
|
||||
@@ -293,7 +293,7 @@ def findvideos(item):
|
||||
|
||||
|
||||
def getUrl(pathId):
|
||||
support.log()
|
||||
support.info()
|
||||
url = pathId.replace(" ", "%20")
|
||||
if url.startswith("/raiplay/"):
|
||||
url = url.replace("/raiplay/",host +'/')
|
||||
@@ -315,7 +315,7 @@ def getUrl(pathId):
|
||||
|
||||
|
||||
def addinfo(key, item):
|
||||
support.log()
|
||||
support.info()
|
||||
info = current_session.get(getUrl(key['info_url'])).json()
|
||||
if not item.search or item.search.lower() in key['name'].lower():
|
||||
it = item.clone(title = support.typo(key['name'],'bold'), fulltitle = key['name'], show = key['name'],
|
||||
@@ -333,7 +333,7 @@ def addinfo(key, item):
|
||||
|
||||
|
||||
def load_episodes(key, item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
json = current_session.get(getUrl(key['path_id'])).json()['items']
|
||||
order = 0
|
||||
|
||||
+6
-7
@@ -5,14 +5,13 @@
|
||||
|
||||
|
||||
from core import support
|
||||
def findhost():
|
||||
return support.match('https://nuovoindirizzo.info/seriehd/', patron=r'<h2[^>]+><a href="([^"]+)"').match
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
host = support.config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
@@ -28,7 +27,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
@@ -44,7 +43,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
@@ -137,7 +136,7 @@ def menu(item):
|
||||
|
||||
def findvideos(item):
|
||||
item.url = item.url.replace('&', '&')
|
||||
support.log(item)
|
||||
support.info(item)
|
||||
if item.args == 'last':
|
||||
url = support.match(item, patron = r'<iframe id="iframeVid" width="[^"]+" height="[^"]+" src="([^"]+)" allowfullscreen').match
|
||||
matches = support.match(url,patron=r'<a href="([^"]+)">(\d+)<', patronBlock=r'<h3>EPISODIO</h3><ul>(.*?)</ul>').matches
|
||||
|
||||
+11
-11
@@ -31,7 +31,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
|
||||
film = ['/ultimi-film-aggiunti/',
|
||||
@@ -56,7 +56,7 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
|
||||
blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Cartoni Animati e Anime']
|
||||
patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
@@ -76,13 +76,13 @@ def peliculas(item):
|
||||
pagination = 35
|
||||
|
||||
if not item.args and 'anime' not in item.url:
|
||||
patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+".+?href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[ ](?P<rating>\d+.\d+|\d+)<[^>]+>[^>]+><h2>(?P<title>[^"]+)</h2>[ ]?(?:<span class="year">(?P<year>\d+|\-\d+))?<'
|
||||
patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+".+? href="(?P<url>[^"]+)">.*?<h2>(?P<title>[^"]+)</h2>\s?(?:<span class="year">(?P<year>\d+|\-\d+))?<'
|
||||
else:
|
||||
anime = True
|
||||
patron = r'(?:<td>)?<a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<'
|
||||
else:
|
||||
# SEZIONE FILM
|
||||
# pagination = 25
|
||||
pagination = 25
|
||||
|
||||
if item.args == 'lista':
|
||||
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)(?P<year>\d{4})?<'
|
||||
@@ -105,7 +105,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<table>(?P<block>.*?)<\/table>'
|
||||
patron = r'<tr><td>(?P<title>.*?)?[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>'
|
||||
@@ -119,7 +119,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log("CERCA :" ,text, item)
|
||||
support.info("CERCA :" ,text, item)
|
||||
|
||||
item.url = "%s/?s=%s" % (host, text)
|
||||
|
||||
@@ -130,11 +130,11 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
support.info("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
|
||||
itemlist = []
|
||||
item = Item()
|
||||
@@ -153,13 +153,13 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("{0}".format(line))
|
||||
support.info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
if item.contentType == 'movie':
|
||||
return support.server(item, headers=headers)
|
||||
else:
|
||||
@@ -173,7 +173,7 @@ 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)
|
||||
#support.info("DATA - HTML:\n", data)
|
||||
url_video = scrapertools.find_single_match(data, r'<tr><td>(.+?)</td><tr>', -1)
|
||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
|
||||
+14
-16
@@ -9,7 +9,7 @@ import time
|
||||
|
||||
from core import httptools, tmdb, scrapertools, support
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from platformcode import logger, config
|
||||
|
||||
host = config.get_channel_url()
|
||||
@@ -21,7 +21,7 @@ list_language = IDIOMAS.values()
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
info()
|
||||
itemlist = []
|
||||
tvshowSub = [
|
||||
('Novità {bold}',[ '', 'peliculas_tv', '', 'tvshow']),
|
||||
@@ -52,7 +52,7 @@ def cleantitle(scrapedtitle):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def findvideos(item):
|
||||
log()
|
||||
info()
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data
|
||||
data = re.sub(r'\n|\t|\s+', ' ', data)
|
||||
# recupero il blocco contenente i link
|
||||
@@ -66,8 +66,8 @@ def findvideos(item):
|
||||
|
||||
episodio = item.infoLabels['episode']
|
||||
patron = r'\.\.:: Episodio %s([\s\S]*?)(<div class="post|..:: Episodio)' % episodio
|
||||
log(patron)
|
||||
log(blocco)
|
||||
info(patron)
|
||||
info(blocco)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(blocco, patron)
|
||||
if len(matches):
|
||||
@@ -89,15 +89,12 @@ def findvideos(item):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def lista_serie(item):
|
||||
log()
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
PERPAGE = 15
|
||||
|
||||
p = 1
|
||||
if '{}' in item.url:
|
||||
item.url, p = item.url.split('{}')
|
||||
p = int(p)
|
||||
p = 1 if not item.args else int(item.args)
|
||||
|
||||
if '||' in item.data:
|
||||
series = item.data.split('\n\n')
|
||||
@@ -129,7 +126,8 @@ def lista_serie(item):
|
||||
|
||||
# Paginazione
|
||||
if len(matches) >= p * PERPAGE:
|
||||
support.nextPage(itemlist, item, next_page=(item.url + '{}' + str(p + 1)))
|
||||
item.args = p + 1
|
||||
support.nextPage(itemlist, item, next_page=item.url)
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -139,7 +137,7 @@ def lista_serie(item):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def episodios(item, itemlist=[]):
|
||||
log()
|
||||
info()
|
||||
patron = r'<div class="post-meta">\s*<a href="([^"]+)"\s*title="([^"]+)"\s*class=".*?"></a>.*?'
|
||||
patron += r'<p><a href="([^"]+)">'
|
||||
|
||||
@@ -214,7 +212,7 @@ def episodios(item, itemlist=[]):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def peliculas_tv(item):
|
||||
log()
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
patron = r'<div class="post-meta">\s*<a href="([^"]+)"\s*title="([^"]+)"\s*class=".*?"></a>'
|
||||
@@ -267,7 +265,7 @@ def peliculas_tv(item):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.url = host
|
||||
@@ -291,7 +289,7 @@ def newest(categoria):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
info(texto)
|
||||
itemlist = []
|
||||
|
||||
patron = r'<li class="cat-item cat-item-\d+"><a href="([^"]+)"\s?>([^<]+)</a>'
|
||||
@@ -322,7 +320,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def list_az(item):
|
||||
log()
|
||||
info()
|
||||
itemlist = []
|
||||
|
||||
alphabet = dict()
|
||||
|
||||
@@ -10,7 +10,7 @@ import re
|
||||
|
||||
from core import support, httptools, scrapertools
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from platformcode import config
|
||||
|
||||
host = config.get_channel_url()
|
||||
@@ -54,8 +54,8 @@ def episodios(item):
|
||||
patron = r'(?:<div class="list (?:active)?")?\s*<a data-id="\d+(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<other>[^>]+)>.*?Episodio [0-9]+\s?(?:<br>(?P<title>[^<]+))?.*?Stagione (?P<season>[0-9]+) , Episodio - (?P<episode>[0-9]+).*?<(?P<url>.*?<iframe)'
|
||||
def itemHook(item):
|
||||
for value, season in seasons:
|
||||
log(value)
|
||||
log(season)
|
||||
info(value)
|
||||
info(season)
|
||||
item.title = item.title.replace(value+'x',season+'x')
|
||||
item.url += '\n' + item.other
|
||||
return item
|
||||
@@ -72,7 +72,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
log(text)
|
||||
info(text)
|
||||
item.url = host + "/?s=" + text
|
||||
try:
|
||||
item.contentType = 'tvshow'
|
||||
@@ -81,12 +81,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
info("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
info(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -101,14 +101,14 @@ def newest(categoria):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("{0}".format(line))
|
||||
info("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log(item)
|
||||
info(item)
|
||||
if item.args != 'update':
|
||||
return support.server(item, data=item.url)
|
||||
else:
|
||||
@@ -126,6 +126,6 @@ def findvideos(item):
|
||||
contentType='tvshow',
|
||||
url=url_serie,
|
||||
action='episodios',
|
||||
thumbnail = support.thumb(thumb='tvshow.png')))
|
||||
thumbnail = support.thumb('tvshow')))
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -32,7 +32,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log("[streamingaltadefinizione.py] " + item.url + " search " + text)
|
||||
support.info("[streamingaltadefinizione.py] " + item.url + " search " + text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
# Canale per AnimeUnity
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import requests, json, copy
|
||||
from core import support, jsontools
|
||||
from specials import autorenumber
|
||||
import requests, json
|
||||
from core import support
|
||||
|
||||
try: from lib import cloudscraper
|
||||
except: from lib import cloudscraper
|
||||
@@ -37,7 +36,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def genres(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
||||
args = support.match(data, patronBlock=r'genre-options-json="([^\]]+)\]', patron=r'name"\s*:\s*"([^"]+)').matches
|
||||
@@ -48,7 +47,7 @@ def genres(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
support.info('search', item)
|
||||
item.search = text
|
||||
|
||||
try:
|
||||
@@ -57,12 +56,12 @@ def search(item, text):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
support.info('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(category):
|
||||
support.log(category)
|
||||
support.info(category)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.args = 1
|
||||
@@ -80,7 +79,7 @@ def newest(category):
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log(line)
|
||||
support.info(line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -88,7 +87,7 @@ def newest(category):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
videoType = 'movie' if item.contentType == 'movie' else 'tv'
|
||||
|
||||
@@ -147,15 +146,15 @@ def peliculas(item):
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
|
||||
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
||||
support.log(js)
|
||||
support.info(js)
|
||||
|
||||
for episodes in js:
|
||||
for it in episodes['episodes']:
|
||||
support.log(it)
|
||||
support.info(it)
|
||||
itemlist.append(
|
||||
support.Item(channel=item.channel,
|
||||
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
||||
@@ -174,7 +173,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist=[]
|
||||
url = support.match(support.match(item).data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||
playlist = support.match(url.replace('https','http'), patron=r'\./([^.]+)').matches
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "tantifilm",
|
||||
"name": "Tantifilm",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "tantifilm.png",
|
||||
"banner": "tantifilm.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
|
||||
+11
-11
@@ -7,7 +7,7 @@ import re
|
||||
|
||||
from core import scrapertools, httptools, support
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from core.support import info
|
||||
from platformcode import logger
|
||||
from platformcode import config, unify
|
||||
|
||||
@@ -24,7 +24,7 @@ player_iframe = r'<iframe src="([^"]+)"[^>]+></iframe>\s?<div class="player'
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
info()
|
||||
|
||||
top = [('Generi', ['', 'category'])]
|
||||
film = ['/film',
|
||||
@@ -65,7 +65,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
info()
|
||||
if not item.data:
|
||||
data_check = httptools.downloadpage(item.url, headers=headers).data
|
||||
data_check = re.sub('\n|\t', ' ', data_check)
|
||||
@@ -125,7 +125,7 @@ def category(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
info(texto)
|
||||
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
@@ -166,17 +166,17 @@ def hdpass(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
support.log("ITEMLIST: ", item)
|
||||
info()
|
||||
support.info("ITEMLIST: ", item)
|
||||
data = support.match(item.url, headers=headers).data
|
||||
check = support.match(data, patron=r'<div class="category-film">(.*?)</div>').match
|
||||
if 'sub' in check.lower():
|
||||
item.contentLanguage = 'Sub-ITA'
|
||||
support.log("CHECK : ", check)
|
||||
support.info("CHECK : ", check)
|
||||
if 'anime' in check.lower():
|
||||
item.contentType = 'tvshow'
|
||||
item.data = data
|
||||
support.log('select = ### è una anime ###')
|
||||
support.info('select = ### è una anime ###')
|
||||
try:
|
||||
return episodios(item)
|
||||
except:
|
||||
@@ -188,7 +188,7 @@ def findvideos(item):
|
||||
|
||||
# if 'protectlink' in data:
|
||||
# urls = scrapertools.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
# support.log("SONO QUI: ", urls)
|
||||
# support.info("SONO QUI: ", urls)
|
||||
# for url in urls:
|
||||
# url = url.decode('base64')
|
||||
# # tiro via l'ultimo carattere perchè non c'entra
|
||||
@@ -199,7 +199,7 @@ def findvideos(item):
|
||||
# if url:
|
||||
# listurl.add(url)
|
||||
# data += '\n'.join(listurl)
|
||||
log(data)
|
||||
info(data)
|
||||
itemlist = []
|
||||
# support.dbg()
|
||||
|
||||
@@ -211,7 +211,7 @@ def findvideos(item):
|
||||
if item.otherLinks:
|
||||
urls += support.match(item.otherLinks, patron=r'href="([^"]+)').matches
|
||||
|
||||
log('URLS', urls)
|
||||
info('URLS', urls)
|
||||
for u in urls:
|
||||
if 'hdplayer.casa/series/' in u:
|
||||
urls.remove(u)
|
||||
|
||||
@@ -27,7 +27,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
support.info(texto)
|
||||
item.args='search'
|
||||
item.contentType='tvshow'
|
||||
item.url = host + '/?s=' + texto
|
||||
@@ -42,7 +42,7 @@ def search(item, texto):
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
support.info(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
item.contentType = 'tvshow'
|
||||
@@ -86,7 +86,7 @@ def peliculas(item):
|
||||
patron = r'<li ><a href="(?P<url>[^"]+)" title="[^>]+">(?P<title>[^<|\(]+)?(?:\([^\d]*(?P<year>\d+)\))?[^<]*</a>'
|
||||
|
||||
def itemHook(item):
|
||||
support.log(item.title)
|
||||
support.info(item.title)
|
||||
item.title = support.re.sub(' (?:- )?[Ss]erie [Tt][Vv]', '', item.title)
|
||||
if item.args == 'sub':
|
||||
#corregge l'esatta lang per quelle pagine in cui c'è
|
||||
|
||||
+4
-4
@@ -22,19 +22,19 @@ def mainlist(item):
|
||||
action = 'radio'
|
||||
patron = r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"'
|
||||
def itemHook(item):
|
||||
item.thumbnail = support.thumb(thumb='music.png')
|
||||
item.thumbnail = support.thumb('music')
|
||||
item.contentType = 'music'
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo('Cerca...', 'bold color kod'), action='search', thumbnail=support.thumb(thumb='search.png')))
|
||||
item.clone(title=support.typo('Cerca...', 'bold color kod'), action='search', thumbnail=support.thumb('search')))
|
||||
support.channel_config(item, itemlist)
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def radio(item):
|
||||
support.log()
|
||||
support.info()
|
||||
itemlist = []
|
||||
data = support.match(item, patron= r'text="(?P<title>[^\("]+)(?:\((?P<location>[^\)]+)\))?" URL="(?P<url>[^"]+)" bitrate="(?P<quality>[^"]+)" reliability="[^"]+" guide_id="[^"]+" subtext="(?P<song>[^"]+)" genre_id="[^"]+" formats="(?P<type>[^"]+)" (?:playing="[^"]+" )?(?:playing_image="[^"]+" )?(?:show_id="[^"]+" )?(?:item="[^"]+" )?image="(?P<thumb>[^"]+)"')
|
||||
if data.matches:
|
||||
@@ -85,7 +85,7 @@ def findvideos(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
item.url = host + '/Search.ashx?query=' +text
|
||||
try:
|
||||
return radio(item)
|
||||
|
||||
+1
-3
@@ -3,10 +3,8 @@
|
||||
# Canale per vedohd
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, httptools, support
|
||||
from core.item import Item
|
||||
from core import scrapertools, support, autoplay
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = ""
|
||||
|
||||
+6
-11
@@ -3,13 +3,8 @@
|
||||
# Canale per vvvvid
|
||||
# ----------------------------------------------------------
|
||||
import requests, sys
|
||||
from core import support, tmdb
|
||||
from specials import autorenumber
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
from core import support, tmdb
|
||||
from platformcode import autorenumber
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
@@ -71,7 +66,7 @@ def mainlist(item):
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
support.info(text)
|
||||
itemlist = []
|
||||
if conn_id:
|
||||
if 'film' in item.url: item.contentType = 'movie'
|
||||
@@ -106,7 +101,7 @@ def peliculas(item):
|
||||
itemlist = []
|
||||
if not item.args:
|
||||
json_file =loadjs(item.url + 'channel/10005/last/')
|
||||
support.log(json_file)
|
||||
support.logger.debug(json_file)
|
||||
make_itemlist(itemlist, item, json_file)
|
||||
|
||||
elif ('=' not in item.args) and ('=' not in item.url):
|
||||
@@ -142,7 +137,7 @@ def episodios(item):
|
||||
show_id = str(json_file['data'][0]['show_id'])
|
||||
season_id = str(json_file['data'][0]['season_id'])
|
||||
episodes = []
|
||||
support.log('SEASON ID= ',season_id)
|
||||
support.info('SEASON ID= ',season_id)
|
||||
for episode in json_file['data']:
|
||||
episodes.append(episode['episodes'])
|
||||
for episode in episodes:
|
||||
@@ -233,7 +228,7 @@ def make_itemlist(itemlist, item, data):
|
||||
def loadjs(url):
|
||||
if '?category' not in url:
|
||||
url += '?full=true'
|
||||
support.log('Json URL;',url)
|
||||
support.info('Json URL;',url)
|
||||
json = current_session.get(url, headers=headers, params=payload).json()
|
||||
return json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user