KoD 1.3.1
- aggiunti nuovi canali: film4k, animealtadefinizione, streamingcommunity, animeuniverse , guardaserieICU - HDmario ora supporta l'utilizzo di account - Miglioramenti sezione news, è ora possibile raggruppare per canale o per contenuto, e settare l'ordinamento - risolto il fastidioso problema per cui poteva capitare che la ricerca ripartisse dopo un refresh di kodi (tipicamente quando l'aggiornamento della videoteca finiva) - alcuni fix ai canali
This commit is contained in:
@@ -130,6 +130,7 @@ def newest(categoria):
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
item.contentType = 'movie'
|
||||
itemlist = peliculas(item)
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
@@ -88,6 +88,7 @@ def newest(categoria):
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.action = "peliculas"
|
||||
item.contentType='movie'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
|
||||
@@ -22,7 +22,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
def findhost():
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.link/').data
|
||||
data = support.httptools.downloadpage('https://altadefinizione-nuovo.me/').data
|
||||
host = support.scrapertools.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
return host
|
||||
|
||||
@@ -30,7 +30,6 @@ host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['',
|
||||
@@ -117,6 +116,7 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.args = 'news'
|
||||
item.contentType = 'movie'
|
||||
item.url = host + "/nuove-uscite/"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"id": "animealtadefinizione",
|
||||
"name": "AnimealtAdefinizione",
|
||||
"active": true,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "animealtadefinizione.png",
|
||||
"banner": "animealtadefinizione.png",
|
||||
"categories": ["anime", "sub-ita"],
|
||||
"default_off": ["include_in_newest"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "perpage",
|
||||
"type": "list",
|
||||
"label": "Elementi per pagina",
|
||||
"default": 3,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["20","30","40","50","60","70","80","90","100"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per animealtadefinizione
|
||||
# ----------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
perpage_list = ['20','30','40','50','60','70','80','90','100']
|
||||
perpage = perpage_list[support.config.get_setting('perpage' , 'animealtadefinizione')]
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
anime=['/anime/',
|
||||
('Tipo',['', 'menu', 'Anime']),
|
||||
('Anno',['', 'menu', 'Anno']),
|
||||
('Genere', ['', 'menu','Genere']),
|
||||
('Ultimi Episodi',['', 'peliculas', 'last'])]
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
data = support.match(item, patron= r'<a href="' + host + r'/category/' + item.args.lower() + r'/">' + item.args + r'</a><ul class="sub-menu">(.*?)</ul>').match
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
item.search = texto
|
||||
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 newest(categoria):
|
||||
support.log(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
item.url = host
|
||||
item.args = "last"
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if '/movie/' in item.url:
|
||||
item.contentType = 'movie'
|
||||
action='findvideos'
|
||||
elif item.args == 'last':
|
||||
item.contentType = 'episode'
|
||||
action='findvideos'
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
action='episodios'
|
||||
if item.search:
|
||||
query = 's'
|
||||
searchtext = item.search
|
||||
else:
|
||||
query='category_name'
|
||||
searchtext = item.url.split('/')[-2]
|
||||
if not item.pag: item.pag = 1
|
||||
|
||||
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)'
|
||||
|
||||
typeContentDict = {'movie':['movie']}
|
||||
typeActionDict = {'findvideos':['movie']}
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
if item.search:
|
||||
itemlist = [ it for it in itemlist if ' Episodio ' not in it.title ]
|
||||
if len(itemlist) == int(perpage):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='peliculas'))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
pagination = int(perpage)
|
||||
patron = epPatron
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if item.contentType == 'movie':
|
||||
matches = support.match(item, patron=epPatron).matches
|
||||
for title, url in matches:
|
||||
get_video_list(url, title, itemlist)
|
||||
else:
|
||||
get_video_list(item.url, 'Diretto', itemlist)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def get_video_list(url, title, itemlist):
|
||||
from requests import get
|
||||
if not url.startswith('http'): url = host + url
|
||||
|
||||
url = support.match(get(url).url, string=True, patron=r'file=([^$]+)').match
|
||||
if 'http' not in url: url = 'http://' + url
|
||||
itemlist.append(support.Item(title=title, url=url, server='directo', action='play'))
|
||||
|
||||
return itemlist
|
||||
+14
-13
@@ -16,20 +16,21 @@ def get_data(item, head=[]):
|
||||
for h in head:
|
||||
headers[h[0]] = h[1]
|
||||
if not item.count: item.count = 0
|
||||
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 not config.get_setting('key', item.channel) and 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]
|
||||
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)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"id": "animeuniverse",
|
||||
"name": "AnimeUniverse",
|
||||
"active": true,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "animeuniverse.png",
|
||||
"banner": "animeuniverse.png",
|
||||
"categories": ["anime", "sub-ita"],
|
||||
"default_off": ["include_in_newest"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "perpage",
|
||||
"type": "list",
|
||||
"label": "Elementi per pagina",
|
||||
"default": 3,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["20","30","40","50","60","70","80","90","100"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per animeuniverse
|
||||
# ----------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
headers = {}
|
||||
|
||||
perpage_list = ['20','30','40','50','60','70','80','90','100']
|
||||
perpage = perpage_list[support.config.get_setting('perpage' , 'animeuniverse')]
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
anime=['/anime/',
|
||||
('Tipo',['', 'menu', 'Anime']),
|
||||
('Anno',['', 'menu', 'Anno']),
|
||||
('Genere', ['', 'menu','Genere']),
|
||||
('Ultimi Episodi',['/2/', 'peliculas', 'last']),
|
||||
('Hentai', ['/hentai/', 'peliculas'])]
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
data = support.match(item, patron= item.args + r'</a><ul class="sub-menu">(.*?)</ul>').match
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
item.search = texto
|
||||
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 newest(categoria):
|
||||
support.log(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
item.url = host
|
||||
item.args = "last"
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if '/mos/' in item.url:
|
||||
item.contentType = 'movie'
|
||||
action='findvideos'
|
||||
elif item.args == 'last':
|
||||
query='cat%5D=1¤tquery%5Bcategory__not_in%5D%5B'
|
||||
searchtext=''
|
||||
item.contentType = 'episode'
|
||||
action='findvideos'
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
action='episodios'
|
||||
if item.search:
|
||||
query = 's'
|
||||
searchtext = item.search
|
||||
if not query:
|
||||
query='category_name'
|
||||
searchtext = item.url.split('/')[-2] if item.url != host else ''
|
||||
if not item.pag: item.pag = 1
|
||||
|
||||
anime=True
|
||||
blacklist=['Altri Hentai']
|
||||
data = support.match(host + '/wp-content/themes/animeuniverse/functions/ajax.php', post='sorter=recent&location=&loop=main+loop&action=sort&numarticles='+perpage+'&paginated='+str(item.pag)+'¤tquery%5B'+query+'%5D='+searchtext+'&thumbnail=1').data.replace('\\','')
|
||||
patron=r'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s*(?P<lang>Sub ITA|ITA)?(?:"| \[)'
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
if len(itemlist) == int(perpage) - len(blacklist):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='peliculas'))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
pagination = int(perpage)
|
||||
patron = epPatron
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if item.contentType == 'movie':
|
||||
matches = support.match(item, patron=epPatron).matches
|
||||
for title, url in matches:
|
||||
get_video_list(url, title, itemlist)
|
||||
else:
|
||||
get_video_list(item.url, 'Diretto', itemlist)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
def get_video_list(url, title, itemlist):
|
||||
from requests import get
|
||||
if not url.startswith('http'): url = host + url
|
||||
|
||||
url = support.match(get(url).url, string=True, patron=r'file=([^$]+)').match
|
||||
if 'http' not in url: url = 'http://' + url
|
||||
itemlist.append(support.Item(title=title, url=url, server='directo', action='play'))
|
||||
|
||||
return itemlist
|
||||
+20
-20
@@ -24,24 +24,25 @@ def get_data(item, head=[]):
|
||||
for h in head:
|
||||
headers[h[0]] = h[1]
|
||||
if not item.count: item.count = 0
|
||||
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 not config.get_setting('key', item.channel) and 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]
|
||||
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="([^"]+)"')
|
||||
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
|
||||
@@ -73,8 +74,8 @@ def mainlist(item):
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
data = get_data(item)
|
||||
patronBlock = r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> Generi <span.[^>]+>(?P<block>.*?)</ul>'
|
||||
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>'
|
||||
patronBlock = r'dropdown[^>]*>\s*Generi\s*<span.[^>]+>(?P<block>.*?)</ul>'
|
||||
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)</label>'
|
||||
|
||||
def itemHook(item):
|
||||
item.url = host + '/filter?' + item.name + '=' + item.value + '&sort='
|
||||
@@ -152,7 +153,7 @@ def peliculas(item):
|
||||
action='episodios'
|
||||
|
||||
# Controlla la lingua se assente
|
||||
patronNext=r'href="([^"]+)" rel="next"'
|
||||
patronNext=r'</span></a><a href="([^"]+)"'
|
||||
typeContentDict={'movie':['movie', 'special']}
|
||||
typeActionDict={'findvideos':['movie', 'special']}
|
||||
def itemHook(item):
|
||||
@@ -172,8 +173,7 @@ def episodios(item):
|
||||
anime=True
|
||||
pagination = 50
|
||||
data = get_data(item)
|
||||
support.log(data)
|
||||
patronBlock= r'<div class="server\s*active\s*"(?P<block>.*?)<div class="server'
|
||||
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):
|
||||
item.number = support.re.sub(r'\[[^\]]+\]', '', item.title)
|
||||
@@ -192,7 +192,7 @@ def findvideos(item):
|
||||
data = resp.data
|
||||
for ID, name in resp.matches:
|
||||
if not item.number: item.number = support.match(item.title, patron=r'(\d+) -').match
|
||||
match = support.match(data, patronBlock=r'data-name="' + ID + r'"[^>]+>(.*?)<div class="(?:server|download)', patron=r'data-id="([^"]+)" data-episode-num="' + (item.number if item.number else '1') + '"' + r'.*?href="([^"]+)"').match
|
||||
match = support.match(data, patronBlock=r'data-name="' + ID + r'"[^>]+>(.*?)(?:<div class="(?:server|download)|link)', patron=r'data-id="([^"]+)" data-episode-num="' + (item.number if item.number else '1') + '"' + r'.*?href="([^"]+)"').match
|
||||
if match:
|
||||
epID, epurl = match
|
||||
if 'vvvvid' in name.lower():
|
||||
|
||||
@@ -31,7 +31,8 @@ def mainlist(item):
|
||||
def peliculas(item):
|
||||
action = 'episodios'
|
||||
if item.args == 'newest':
|
||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+)–\s*<a href="(?P<url>[^"]+)"[^>]*>\s?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
|
||||
item.contentType = 'episode'
|
||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+) –\s*<a href="(?P<url>[^"]+)"[^>]*>\s?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<\(]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
|
||||
pagination = ''
|
||||
else:
|
||||
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "film4k",
|
||||
"name": "Film4k",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"thumbnail": "film4k.png",
|
||||
"banner": "film4k.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per film4k
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def findhost():
|
||||
return support.httptools.downloadpage('https://film4k-nuovo.link').url
|
||||
|
||||
host = config.get_channel_url(findhost)
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['movies',
|
||||
('Qualità', ['', 'menu', 'quality']),
|
||||
('Generi', ['movies', 'menu', 'genres']),
|
||||
('Anno', ['movies', 'menu', 'releases']),
|
||||
('Più popolari', ['trending/?get=movies', 'peliculas']),
|
||||
('Più votati', ['ratings/?get=movies', 'peliculas'])]
|
||||
tvshow = ['/tvshows',
|
||||
('Più popolari', ['trending/?get=tv', 'peliculas']),
|
||||
('Più votati', ['ratings/?get=tv', 'peliculas'])]
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info()
|
||||
item.url = item.url + "/?s=" + text
|
||||
try:
|
||||
return support.dooplay_search(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if 'anime' in item.url:
|
||||
return support.dooplay_peliculas(item, True)
|
||||
else:
|
||||
return support.dooplay_peliculas(item, False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
itemlist = support.dooplay_get_episodes(item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if item.contentType == 'episode':
|
||||
linkHead = support.httptools.downloadpage(item.url, only_headers=True).headers['link']
|
||||
epId = support.scrapertools.find_single_match(linkHead, r'\?p=([0-9]+)>')
|
||||
for link in support.dooplay_get_links(item, host, paramList=[['tv', epId, 1, 'title', 'server']]):
|
||||
itemlist.append(
|
||||
item.clone(action="play", url=link['url']))
|
||||
else:
|
||||
for link, quality in support.match(item.url, patron="(" + host + """links/[^"]+).*?class="quality">([^<]+)""").matches:
|
||||
srv = support.servertools.find_video_items(data=support.httptools.downloadpage(link).data)
|
||||
for s in srv:
|
||||
s.quality = quality
|
||||
itemlist.extend(srv)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
if item.args in ['genres','releases']:
|
||||
patronBlock = r'<nav class="' + item.args + r'">(?P<block>.*?)</nav'
|
||||
patronMenu= r'<a href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)<'
|
||||
else:
|
||||
patronBlock = r'class="main-header">(?P<block>.*?)headitems'
|
||||
patronMenu = r'(?P<url>' + host + r'quality/[^/]+/\?post_type=movies)">(?P<title>[^<]+)'
|
||||
return locals()
|
||||
@@ -10,7 +10,7 @@ from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
def findhost():
|
||||
page = httptools.downloadpage("https://www.filmpertutti.group/").data
|
||||
page = httptools.downloadpage("https://filmpertutti.nuovo.live/").data
|
||||
url = scrapertools.find_single_match(page, 'Il nuovo indirizzo di FILMPERTUTTI è <a href="([^"]+)')
|
||||
return url
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "guardaserieIcu",
|
||||
"name": "Guarda Serie Icu",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": false,
|
||||
"active": true,
|
||||
"thumbnail": "https://raw.githubusercontent.com/32Dexter/DexterRepo/master/media/guarda_serie.jpg",
|
||||
"banner": "",
|
||||
"categories": ["tvshow"],
|
||||
|
||||
@@ -81,8 +81,12 @@ def live(item):
|
||||
urls = []
|
||||
if it['tuningInstruction'] and not it['mediasetstation$digitalOnly']:
|
||||
guide=current_session.get('https://static3.mediasetplay.mediaset.it/apigw/nownext/' + it['callSign'] + '.json').json()['response']
|
||||
if 'restartUrl' in guide['currentListing']:
|
||||
urls = [guide['currentListing']['restartUrl']]
|
||||
else:
|
||||
for key in it['tuningInstruction']['urn:theplatform:tv:location:any']:
|
||||
urls += key['publicUrls']
|
||||
plot = support.typo(guide['currentListing']['mediasetlisting$epgTitle'],'bold') + '\n' + guide['currentListing']['mediasetlisting$shortDescription'] + '\n' + guide['currentListing']['description'] + '\n\n' + support.typo('A Seguire:' + guide['nextListing']['mediasetlisting$epgTitle'], 'bold')
|
||||
for key in it['tuningInstruction']['urn:theplatform:tv:location:any']: urls += key['publicUrls']
|
||||
itemlist.append(item.clone(title=support.typo(it['title'], 'bold'),
|
||||
fulltitle=it['title'],
|
||||
show=it['title'],
|
||||
@@ -209,7 +213,6 @@ def play(item):
|
||||
item.license = lic_url % support.match(sec_data, patron=r'pid=([^|]+)').match
|
||||
data = support.match(sec_data, patron=r'<video src="([^"]+)').match
|
||||
|
||||
support.log('LICENSE:',item.license)
|
||||
return support.servertools.find_video_items(item, data=data)
|
||||
|
||||
def subBrand(json):
|
||||
|
||||
@@ -72,7 +72,7 @@ def peliculas(item):
|
||||
elif item.contentType == 'episode':
|
||||
pagination = 35
|
||||
action = 'findvideos'
|
||||
patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<'
|
||||
patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>.*?)(?P<episode>\d+x\d+)[ ]?(?P<title2>[^<]+)?<'
|
||||
|
||||
elif item.contentType == 'tvshow':
|
||||
# SEZIONE Serie TV- Anime - Documentari
|
||||
@@ -109,10 +109,9 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<table>(?P<block>.*?)<\/table>'
|
||||
patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>'
|
||||
patron = r'<tr><td>(?P<title>.*?)?[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>'
|
||||
def itemlistHook(itemlist):
|
||||
for i, item in enumerate(itemlist):
|
||||
ep = support.match(item.title, patron=r'\d+x(\d+)').match
|
||||
|
||||
@@ -276,6 +276,8 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == "series":
|
||||
itemlist = peliculas_tv(item)
|
||||
if itemlist[-1].action == 'peliculas_tv':
|
||||
itemlist.pop(-1)
|
||||
|
||||
except:
|
||||
import sys
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "streamingcommunity",
|
||||
"name": "Streaming Community",
|
||||
"active": true,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "streamingcommunity.png",
|
||||
"banner": "streamingcommunity.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per AnimeUnity
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import requests, json, copy
|
||||
from core import support, jsontools
|
||||
from specials import autorenumber
|
||||
|
||||
try: from lib import cloudscraper
|
||||
except: from lib import cloudscraper
|
||||
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
|
||||
session=requests.Session()
|
||||
response = session.get(host)
|
||||
csrf_token = support.match(response.text, patron= 'name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'content-type': 'application/json;charset=UTF-8',
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie' : '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film=['',
|
||||
('Generi',['/film','genres']),
|
||||
('Titoli del Momento',['/film','peliculas',0]),
|
||||
('Novità',['/film','peliculas',1]),
|
||||
('Popolari',['/film','peliculas',2])]
|
||||
tvshow=['',
|
||||
('Generi',['/serie-tv','genres']),
|
||||
('Titoli del Momento',['/serie-tv','peliculas',0]),
|
||||
('Novità',['/serie-tv','peliculas',1]),
|
||||
('Popolari',['/serie-tv','peliculas',2])]
|
||||
search=''
|
||||
return locals()
|
||||
|
||||
|
||||
def genres(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
||||
args = support.match(data, patronBlock=r'genre-options-json="([^\]]+)\]', patron=r'name"\s*:\s*"([^"]+)').matches
|
||||
for arg in args:
|
||||
itemlist.append(item.clone(title=support.typo(arg, 'bold'), args=arg, action='peliculas'))
|
||||
support.thumb(itemlist, genre=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
item.search = text
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
def newest(category):
|
||||
support.log(category)
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
item.args = 1
|
||||
if category == 'peliculas':
|
||||
item.url = host + '/film'
|
||||
else:
|
||||
item.url = host + '/serie-tv'
|
||||
|
||||
try:
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log(line)
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
videoType = 'movie' if item.contentType == 'movie' else 'tv'
|
||||
|
||||
page = item.page if item.page else 0
|
||||
offset = page * 60
|
||||
|
||||
if type(item.args) == int:
|
||||
data = support.scrapertools.decodeHtmlentities(support.match(item).data)
|
||||
records = json.loads(support.match(data, patron=r'slider-title titles-json="(.*?)" slider-name="').matches[item.args])
|
||||
elif not item.search:
|
||||
payload = json.dumps({'type': videoType, 'offset':offset, 'genre':item.args})
|
||||
records = json.loads(requests.post(host + '/infinite/browse', headers=headers, data=payload).json()['records'])
|
||||
else:
|
||||
records = requests.get(host + '/search?q=' + item.search + '&live=true', headers=headers).json()['records']
|
||||
|
||||
if records and type(records[0]) == list:
|
||||
js = []
|
||||
for record in records:
|
||||
js += record
|
||||
else:
|
||||
js = records
|
||||
|
||||
for it in js:
|
||||
title, lang = support.match(it['name'], patron=r'([^\[|$]+)(?:\[([^\]]+)\])?').match
|
||||
if not lang:
|
||||
lang = 'ITA'
|
||||
itm = item.clone(title=support.typo(title,'bold') + support.typo(lang,'_ [] color kod bold'))
|
||||
itm.type = it['type']
|
||||
itm.thumbnail = 'https://image.tmdb.org/t/p/w500' + it['images'][0]['url']
|
||||
itm.fanart = 'https://image.tmdb.org/t/p/w1280' + it['images'][2]['url']
|
||||
itm.plot = it['plot']
|
||||
itm.infoLabels['tmdb_id'] = it['tmdb_id']
|
||||
itm.language = lang
|
||||
|
||||
|
||||
if itm.type == 'movie':
|
||||
itm.contentType = 'movie'
|
||||
itm.fulltitle = itm.show = itm.contentTitle = title
|
||||
itm.contentSerieName = ''
|
||||
itm.action = 'findvideos'
|
||||
itm.url = host + '/watch/%s' % it['id']
|
||||
|
||||
else:
|
||||
itm.contentType = 'tvshow'
|
||||
itm.contentTitle = ''
|
||||
itm.fulltitle = itm.show = itm.contentSerieName = title
|
||||
itm.action = 'episodios'
|
||||
itm.season_count = it['seasons_count']
|
||||
itm.url = host + '/titles/%s-%s' % (it['id'], it['slug'])
|
||||
|
||||
itemlist.append(itm)
|
||||
|
||||
if len(itemlist) >= 60:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page + 1))
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
js = json.loads(support.match(item.url, patron=r'seasons="([^"]+)').match.replace('"','"'))
|
||||
support.log(js)
|
||||
|
||||
for episodes in js:
|
||||
for it in episodes['episodes']:
|
||||
support.log(it)
|
||||
itemlist.append(
|
||||
support.Item(channel=item.channel,
|
||||
title=support.typo(str(episodes['number']) + 'x' + str(it['number']).zfill(2) + ' - ' + it['name'], 'bold'),
|
||||
episode = it['number'],
|
||||
season=episodes['number'],
|
||||
thumbnail='https://image.tmdb.org/t/p/w1280' + it['images'][0]['url'],
|
||||
fanart='https://image.tmdb.org/t/p/w1280' + it['images'][0]['url'],
|
||||
plot=it['plot'],
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
url=host + '/watch/' + str(episodes['title_id']) + '?e=' + str(it['id'])))
|
||||
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
itemlist=[]
|
||||
url = support.match(support.match(item).data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||
playlist = support.match(url, patron=r'\./([^.]+)').matches
|
||||
for res in playlist:
|
||||
itemlist.append(item.clone(title='Diretto', server='directo', url=url.replace('playlist',res), quality=res, action='play'))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
@@ -21,8 +21,6 @@ host = config.get_channel_url(findhost)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
@@ -147,13 +145,10 @@ def search(item, texto):
|
||||
def newest(categoria):
|
||||
if categoria == 'series':
|
||||
item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv-2')
|
||||
item.contentType = 'tvshow'
|
||||
patronBlock = 'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
patron = '<p>(?P<title>.*?)\((?P<year>[0-9]{4})-?\)\s*streaming.*?href="(?P<url>[^"]+)'
|
||||
|
||||
def itemHook(item):
|
||||
item.title = item.contentTitle = item.fulltitle = item.contentSerieName = item.contentTitle = scrapertools.htmlclean(item.title)
|
||||
return item
|
||||
data = support.match(item).data.replace('<u>','').replace('</u>','')
|
||||
item.contentType = 'episode'
|
||||
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
patron = r'<p>(?P<title>.*?)\((?P<year>[0-9]{4})[^\)]*\)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+) (?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa])?(?P<title2>[^<]+)?'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user