Modifiche del 26/11/2021
This commit is contained in:
@@ -25,7 +25,7 @@ def mainlist(item):
|
||||
thumbnail = support.thumb('music')
|
||||
))
|
||||
|
||||
itemlist.append(item.clone(title=support.typo(config.get_localized_string(70741) % 'Musica… ', 'bold'), action='search', thumbnail=support.thumb('music_search')))
|
||||
itemlist.append(item.clone(title=support.typo(config.getLocalizedString(70741) % 'Musica… ', 'bold'), action='search', thumbnail=support.thumb('music_search')))
|
||||
support.channel_config(item, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
|
||||
headers = {'Referer': host}
|
||||
order = ['', 'i_piu_visti', 'i_piu_votati', 'i_piu_votati_dellultimo_mese', 'titolo_az', 'voto_imdb_piu_alto'][config.get_setting('order', 'altadefinizionecommunity')]
|
||||
order = ['', 'i_piu_visti', 'i_piu_votati', 'i_piu_votati_dellultimo_mese', 'titolo_az', 'voto_imdb_piu_alto'][config.getSetting('order', 'altadefinizionecommunity')]
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -168,9 +168,9 @@ def findvideos(item):
|
||||
def play(item):
|
||||
if host in item.url: # intercetto il server proprietario
|
||||
# if registerOrLogin():
|
||||
return support.get_jwplayer_mediaurl(support.httptools.downloadpage(item.url, cloudscraper=True).data, 'Diretto')
|
||||
return support.get_jwplayer_mediaUrl(support.httptools.downloadpage(item.url, cloudscraper=True).data, 'Diretto')
|
||||
# else:
|
||||
# platformtools.play_canceled = True
|
||||
# platformtools.playCanceled = True
|
||||
# return []
|
||||
else:
|
||||
return [item]
|
||||
@@ -180,9 +180,9 @@ def resolve_url(item):
|
||||
registerOrLogin()
|
||||
if '/watch-unsubscribed' not in item.url and '/watch-external' not in item.url:
|
||||
playWindow = support.match(support.httptools.downloadpage(item.url, cloudscraper=True).data, patron='playWindow" href="([^"]+)')
|
||||
video_url = playWindow.match
|
||||
videoUrl = playWindow.match
|
||||
item.data = playWindow.data
|
||||
item.url = video_url.replace('/watch-unsubscribed', '/watch-external')
|
||||
item.url = videoUrl.replace('/watch-unsubscribed', '/watch-external')
|
||||
return item
|
||||
|
||||
|
||||
@@ -195,33 +195,33 @@ def login():
|
||||
logger.info('Login in corso')
|
||||
post = {'_token': '',
|
||||
'form_action':'login',
|
||||
'email': config.get_setting('username', channel='altadefinizionecommunity'),
|
||||
'password':config.get_setting('password', channel='altadefinizionecommunity')}
|
||||
'email': config.getSetting('username', channel='altadefinizionecommunity'),
|
||||
'password':config.getSetting('password', channel='altadefinizionecommunity')}
|
||||
|
||||
r = support.httptools.downloadpage(host + '/login', post=post, headers={'referer': host}, cloudscraper=True)
|
||||
if r.code not in [200, 302] or 'Email o Password non validi' in r.data:
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', 'Username/password non validi')
|
||||
platformtools.dialogOk('AltadefinizioneCommunity', 'Username/password non validi')
|
||||
return False
|
||||
|
||||
return 'id="logged"' in r.data
|
||||
|
||||
|
||||
def registerOrLogin():
|
||||
if config.get_setting('username', channel='altadefinizionecommunity') and config.get_setting('password', channel='altadefinizionecommunity'):
|
||||
if config.getSetting('username', channel='altadefinizionecommunity') and config.getSetting('password', channel='altadefinizionecommunity'):
|
||||
if login():
|
||||
return True
|
||||
|
||||
action = platformtools.dialog_yesno('AltadefinizioneCommunity',
|
||||
action = platformtools.dialogYesNo('AltadefinizioneCommunity',
|
||||
'Questo server necessita di un account, ne hai già uno oppure vuoi tentare una registrazione automatica?',
|
||||
yeslabel='Accedi', nolabel='Tenta registrazione', customlabel='Annulla')
|
||||
if action == 1: # accedi
|
||||
from specials import setting
|
||||
from core.item import Item
|
||||
user_pre = config.get_setting('username', channel='altadefinizionecommunity')
|
||||
password_pre = config.get_setting('password', channel='altadefinizionecommunity')
|
||||
user_pre = config.getSetting('username', channel='altadefinizionecommunity')
|
||||
password_pre = config.getSetting('password', channel='altadefinizionecommunity')
|
||||
setting.channel_config(Item(config='altadefinizionecommunity'))
|
||||
user_post = config.get_setting('username', channel='altadefinizionecommunity')
|
||||
password_post = config.get_setting('password', channel='altadefinizionecommunity')
|
||||
user_post = config.getSetting('username', channel='altadefinizionecommunity')
|
||||
password_post = config.getSetting('password', channel='altadefinizionecommunity')
|
||||
|
||||
if user_pre != user_post or password_pre != password_post:
|
||||
return registerOrLogin()
|
||||
@@ -235,7 +235,7 @@ def registerOrLogin():
|
||||
randPsw = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(10))
|
||||
logger.debug('email: ' + mailbox.address)
|
||||
logger.debug('pass: ' + randPsw)
|
||||
reg = platformtools.dialog_register(register_url, email=True, password=True, email_default=mailbox.address, password_default=randPsw)
|
||||
reg = platformtools.dialogRegister(register_url, email=True, password=True, email_default=mailbox.address, password_default=randPsw)
|
||||
if not reg:
|
||||
return False
|
||||
regPost = httptools.downloadpage(register_url, post={'email': reg['email'], 'password': reg['password']}, cloudscraper=True)
|
||||
@@ -243,27 +243,27 @@ def registerOrLogin():
|
||||
if regPost.url == register_url:
|
||||
error = scrapertools.htmlclean(scrapertools.find_single_match(regPost.data, 'Impossibile proseguire.*?</div>'))
|
||||
error = scrapertools.unescape(scrapertools.re.sub('\n\s+', ' ', error))
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', error)
|
||||
platformtools.dialogOk('AltadefinizioneCommunity', error)
|
||||
return False
|
||||
if reg['email'] == mailbox.address:
|
||||
if "L'indirizzo email risulta già registrato" in regPost.data:
|
||||
# httptools.downloadpage(baseUrl + '/forgotPassword', post={'email': reg['email']})
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', 'Indirizzo mail già utilizzato')
|
||||
platformtools.dialogOk('AltadefinizioneCommunity', 'Indirizzo mail già utilizzato')
|
||||
return False
|
||||
mail = mailbox.waitForMail()
|
||||
if mail:
|
||||
checkUrl = scrapertools.find_single_match(mail.body, '<a href="([^"]+)[^>]+>Verifica').replace(r'\/', '/')
|
||||
logger.debug('CheckURL: ' + checkUrl)
|
||||
httptools.downloadpage(checkUrl, cloudscraper=True)
|
||||
config.set_setting('username', mailbox.address, channel='altadefinizionecommunity')
|
||||
config.set_setting('password', randPsw, channel='altadefinizionecommunity')
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity',
|
||||
config.setSetting('username', mailbox.address, channel='altadefinizionecommunity')
|
||||
config.setSetting('password', randPsw, channel='altadefinizionecommunity')
|
||||
platformtools.dialogOk('AltadefinizioneCommunity',
|
||||
'Registrato automaticamente con queste credenziali:\nemail:' + mailbox.address + '\npass: ' + randPsw)
|
||||
else:
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', 'Impossibile registrarsi automaticamente')
|
||||
platformtools.dialogOk('AltadefinizioneCommunity', 'Impossibile registrarsi automaticamente')
|
||||
return False
|
||||
else:
|
||||
platformtools.dialog_ok('AltadefinizioneCommunity', 'Hai modificato la mail quindi KoD non sarà in grado di effettuare la verifica in autonomia, apri la casella ' + reg['email']
|
||||
platformtools.dialogOk('AltadefinizioneCommunity', 'Hai modificato la mail quindi KoD non sarà in grado di effettuare la verifica in autonomia, apri la casella ' + reg['email']
|
||||
+ ' e clicca sul link. Premi ok quando fatto')
|
||||
logger.debug('Registrazione completata')
|
||||
else:
|
||||
|
||||
@@ -11,7 +11,7 @@ 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')]
|
||||
perpage = perpage_list[support.config.getSetting('perpage' , 'animealtadefinizione')]
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ def findvideos(item):
|
||||
for title, url in matches:
|
||||
get_video_list(item, url, title, itemlist)
|
||||
else:
|
||||
get_video_list(item, item.url, support.config.get_localized_string(30137), itemlist)
|
||||
get_video_list(item, item.url, support.config.getLocalizedString(30137), itemlist)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
|
||||
@@ -168,6 +168,6 @@ def findvideos(item):
|
||||
if url.startswith('//'): url = 'https:' + url
|
||||
elif url.startswith('/'): url = 'https:/' + url
|
||||
if 'vvvvid' in url: itemlist.append(item.clone(action="play", title='VVVVID', url=url, server='vvvvid'))
|
||||
else: itemlist.append(item.clone(action="play", title=support.config.get_localized_string(30137), url=url, server='directo'))
|
||||
else: itemlist.append(item.clone(action="play", title=support.config.getLocalizedString(30137), url=url, server='directo'))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
@@ -8,14 +8,14 @@ from platformcode import logger
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
__channel__ = 'animesaturn'
|
||||
cookie = support.config.get_setting('cookie', __channel__)
|
||||
cookie = support.config.getSetting('cookie', __channel__)
|
||||
headers = {'X-Requested-With': 'XMLHttpRequest', 'Cookie': cookie}
|
||||
|
||||
|
||||
def get_cookie(data):
|
||||
global cookie, headers
|
||||
cookie = support.match(data, patron=r'document.cookie="([^\s]+)').match
|
||||
support.config.set_setting('cookie', cookie, __channel__)
|
||||
support.config.setSetting('cookie', cookie, __channel__)
|
||||
headers = [['Cookie', cookie]]
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ def movies(item):
|
||||
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()))
|
||||
itemlist.append(item.clone(title=support.typo(support.config.getLocalizedString(30992), 'color kod bold'),page= page, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
elif 'filter' in item.args:
|
||||
page = support.match(data, patron=r'totalPages:\s*(\d+)').match
|
||||
@@ -138,7 +138,7 @@ def movies(item):
|
||||
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()))
|
||||
itemlist.append(item.clone(title=support.typo(support.config.getLocalizedString(30992), 'color kod bold'), url= '{}&page={}'.format(item.url, item.nextpage), infoLabels={}, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
|
||||
else:
|
||||
|
||||
@@ -47,7 +47,7 @@ def menu(item):
|
||||
if item.contentType == 'tvshow':
|
||||
itemlist += [item.clone(title='In Corso', args=InCorso),
|
||||
item.clone(title='Terminato', args=Terminato)]
|
||||
itemlist +=[item.clone(title=support.typo(config.get_localized_string(70741).replace(' %s', '…'),'bold'), action='search', thumbnail=support.thumb('search'))]
|
||||
itemlist +=[item.clone(title=support.typo(config.getLocalizedString(70741).replace(' %s', '…'),'bold'), action='search', thumbnail=support.thumb('search'))]
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ def news(item):
|
||||
fulltitle=it['anime']['title'],
|
||||
thumbnail=it['anime']['imageurl'],
|
||||
forcethumb = True,
|
||||
video_url=it['scws_id'],
|
||||
videoUrl=it['scws_id'],
|
||||
plot=it['anime']['plot'],
|
||||
action='findvideos')
|
||||
)
|
||||
@@ -149,7 +149,7 @@ def movies(item):
|
||||
page = item.page if item.page else 0
|
||||
item.args['offset'] = page * 30
|
||||
|
||||
order = support.config.get_setting('order', item.channel)
|
||||
order = support.config.getSetting('order', item.channel)
|
||||
if order:
|
||||
order_list = [ "Standard", "Lista A-Z", "Lista Z-A", "Popolarità", "Valutazione" ]
|
||||
item.args['order'] = order_list[order]
|
||||
@@ -186,7 +186,7 @@ def movies(item):
|
||||
itm.contentSerieName = ''
|
||||
itm.action = 'play'
|
||||
item.forcethumb=True
|
||||
itm.video_url = it['episodes'][0]['scws_id']
|
||||
itm.videoUrl = it['episodes'][0]['scws_id']
|
||||
|
||||
else:
|
||||
itm.contentType = 'tvshow'
|
||||
@@ -194,7 +194,7 @@ def movies(item):
|
||||
itm.fulltitle = itm.show = itm.contentSerieName = title
|
||||
itm.action = 'episodes'
|
||||
itm.episodes = it['episodes'] if 'episodes' in it else it['scws_id']
|
||||
# itm.video_url = item.url
|
||||
# itm.videoUrl = item.url
|
||||
|
||||
itemlist.append(itm)
|
||||
|
||||
@@ -219,7 +219,7 @@ def episodes(item):
|
||||
action='play',
|
||||
contentType='episode',
|
||||
forcethumb=True,
|
||||
video_url=it['scws_id']))
|
||||
videoUrl=it['scws_id']))
|
||||
|
||||
if inspect.stack()[1][3] not in ['find_episodes']:
|
||||
autorenumber.start(itemlist, item)
|
||||
@@ -234,11 +234,11 @@ def play(item):
|
||||
from hashlib import md5
|
||||
|
||||
# Calculate Token
|
||||
client_ip = support.httptools.downloadpage('https://scws.xyz/videos/{}'.format(item.video_url), headers=headers).json.get('client_ip')
|
||||
client_ip = support.httptools.downloadpage('https://scws.xyz/videos/{}'.format(item.videoUrl), headers=headers).json.get('client_ip')
|
||||
expires = int(time() + 172800)
|
||||
token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
||||
|
||||
url = 'https://scws.xyz/master/{}?token={}&expires={}&n=1'.format(item.video_url, token, expires)
|
||||
url = 'https://scws.xyz/master/{}?token={}&expires={}&n=1'.format(item.videoUrl, token, expires)
|
||||
|
||||
return [item.clone(server='directo', url=url, manifest='hls')]
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ 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')]
|
||||
perpage = perpage_list[support.config.getSetting('perpage' , 'animeuniverse')]
|
||||
epPatron = r'<td>\s*(?P<title>[^ <]+)\s*(?P<episode>\d+)?[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ def movies(item):
|
||||
def itemlistHook(itemlist):
|
||||
if len(itemlist) == int(perpage):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='movies'))
|
||||
itemlist.append(item.clone(title=support.typo(support.config.getLocalizedString(30992), 'color kod bold'), action='movies'))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
@@ -116,7 +116,7 @@ def findvideos(item):
|
||||
for title, url in matches:
|
||||
get_video_list(url, title, itemlist)
|
||||
else:
|
||||
get_video_list(item.url, support.config.get_localized_string(30137), itemlist)
|
||||
get_video_list(item.url, support.config.getLocalizedString(30137), itemlist)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ from platformcode import logger
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
__channel__ = 'animeworld'
|
||||
cookie = support.config.get_setting('cookie', __channel__)
|
||||
cookie = support.config.getSetting('cookie', __channel__)
|
||||
headers = [['Cookie', cookie]]
|
||||
|
||||
|
||||
def get_cookie(data):
|
||||
global cookie, headers
|
||||
cookie = support.match(data, patron=r'document.cookie="([^\s]+)').match
|
||||
support.config.set_setting('cookie', cookie, __channel__)
|
||||
support.config.setSetting('cookie', cookie, __channel__)
|
||||
headers = [['Cookie', cookie]]
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ def get_data(item):
|
||||
|
||||
def order():
|
||||
# Seleziona l'ordinamento dei risultati
|
||||
return str(support.config.get_setting("order", __channel__))
|
||||
return str(support.config.getSetting("order", __channel__))
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -130,7 +130,7 @@ def movies(item):
|
||||
|
||||
if item.args == 'updated':
|
||||
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>'
|
||||
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>)?(?:[^>]+>){2,4}\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>[^\)]+)\))?(?P<title2>[^"]+)?[^>]+>[^>]+>(?:\s*<div class="(?P<l>[^"]+)">[^>]+>)?\s*(?:<div class="[^"]+">(?P<type>[^<]+)</div>)?'
|
||||
@@ -138,6 +138,7 @@ def movies(item):
|
||||
|
||||
# Controlla la lingua se assente
|
||||
patronNext=r'<a href="([^"]+)" class="[^"]+" id="go-next'
|
||||
patronTotalPages=r'<span class="total">(\d+)</span>'
|
||||
typeContentDict={'movie':['movie', 'special']}
|
||||
typeActionDict={'findvideos':['movie', 'special']}
|
||||
def itemHook(item):
|
||||
|
||||
+5
-11
@@ -9,9 +9,9 @@ else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
host = config.get_channel_url()
|
||||
sort = ['views', 'title', 'episodeNumber', 'startDate', 'endDate', 'createdDate'][config.get_setting('sort', 'aniplay')]
|
||||
order = 'asc' if config.get_setting('order', 'aniplay') else 'desc'
|
||||
perpage = [10, 20, 30 ,40, 50, 60, 70, 80, 90][config.get_setting('perpage', 'aniplay')]
|
||||
sort = ['views', 'title', 'episodeNumber', 'startDate', 'endDate', 'createdDate'][config.getSetting('sort', 'aniplay')]
|
||||
order = 'asc' if config.getSetting('order', 'aniplay') else 'desc'
|
||||
perpage = [10, 20, 30 ,40, 50, 60, 70, 80, 90][config.getSetting('perpage', 'aniplay')]
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -123,9 +123,7 @@ def newest(category):
|
||||
|
||||
def latest_added(item):
|
||||
itemlist = []
|
||||
if config.get_setting("window_type") == 0:
|
||||
item.window = True
|
||||
item.folder = False
|
||||
|
||||
page = item.page if item.page else 0
|
||||
url= '{}/api/home/latest-episodes?page={}'.format(host, page)
|
||||
js = httptools.downloadpage(url).json
|
||||
@@ -194,10 +192,6 @@ def episodes(item):
|
||||
logger.debug()
|
||||
itemlist = []
|
||||
|
||||
if config.get_setting("window_type") == 0:
|
||||
item.window = True
|
||||
item.folder = False
|
||||
|
||||
# url = '{}/api/anime/{}'.format(host, item.id)
|
||||
json = httptools.downloadpage(item.url, CF=False ).json
|
||||
|
||||
@@ -299,7 +293,7 @@ def findvideos(item):
|
||||
|
||||
videourl = json['episodeVideo']
|
||||
|
||||
itemlist = [item.clone(title=config.get_localized_string(30137),
|
||||
itemlist = [item.clone(title=config.getLocalizedString(30137),
|
||||
url=videourl,
|
||||
server='directo')]
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ def episodes(item):
|
||||
itemlist = support.season_pagination(itemlist, item, [], 'episodes')
|
||||
else:
|
||||
itemlist = support.pagination(itemlist, item, 'episodes')
|
||||
if config.get_setting('episode_info'):
|
||||
if config.getSetting('episode_info'):
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
|
||||
@@ -68,7 +68,7 @@ def findvideos(item):
|
||||
matches = support.match(item, patron=r'filename: "(.*?)"').matches
|
||||
|
||||
for url in matches:
|
||||
itemlist.append(item.clone(action="play", title=support.config.get_localized_string(30137), server='directo', url=host + url))
|
||||
itemlist.append(item.clone(action="play", title=support.config.getLocalizedString(30137), server='directo', url=host + url))
|
||||
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
+13
-18
@@ -23,7 +23,7 @@ def Dict(item):
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['', 'live']),
|
||||
top = [('Dirette {bullet bold}', ['', 'live']),
|
||||
('Programmi {bullet bold tv}', ['', 'movies', 'programmi']),
|
||||
('Generi {bullet bold tv}', ['', 'genres'])]
|
||||
|
||||
@@ -32,20 +32,6 @@ def mainlist(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def liveDict():
|
||||
livedict = {}
|
||||
|
||||
for key in session.get(api + '/cms/routes/canali?decorators=viewingHistory&include=default', headers=headers).json()['included']:
|
||||
|
||||
if key['type'] == 'channel' and key.get('attributes',{}).get('hasLiveStream', '') and 'Free' in key.get('attributes',{}).get('packages', []):
|
||||
title = key['attributes']['name']
|
||||
livedict[title] = {}
|
||||
livedict[title]['plot'] = key['attributes']['description']
|
||||
livedict[title]['url'] = '{}/canali/{}'.format(host, key['attributes']['alternateId'])
|
||||
livedict[title]['id'] = key['id']
|
||||
return livedict
|
||||
|
||||
|
||||
def search(item, text):
|
||||
itemlist = []
|
||||
item.args = 'search'
|
||||
@@ -63,8 +49,14 @@ def search(item, text):
|
||||
def live(item):
|
||||
logger.debug()
|
||||
itemlist =[]
|
||||
for name, values in liveDict().items():
|
||||
itemlist.append(item.clone(title=name, fulltitle=name, plot=values['plot'], url=values['url'], id=values['id'], action='play', forcethumb=True, no_return=True))
|
||||
for key in session.get(api + '/cms/routes/canali?decorators=viewingHistory&include=default', headers=headers).json()['included']:
|
||||
if key['type'] == 'channel' and key.get('attributes',{}).get('hasLiveStream', '') and 'Free' in key.get('attributes',{}).get('packages', []):
|
||||
title = key['attributes']['name']
|
||||
plot = key['attributes']['description']
|
||||
url = '{}/canali/{}'.format(host, key['attributes']['alternateId'])
|
||||
_id = key['id']
|
||||
|
||||
itemlist.append(item.clone(title=title, fulltitle=title, plot=plot, url=url, id=_id, action='findvideos', forcethumb=True))
|
||||
return support.thumb(itemlist, mode='live')
|
||||
|
||||
|
||||
@@ -166,7 +158,7 @@ def episodes(item):
|
||||
fulltitle=title,
|
||||
plot=plot,
|
||||
id=episode['id'],
|
||||
action='play',
|
||||
action='findvideos',
|
||||
contentType='episode',
|
||||
season=option['id'],
|
||||
episode=episode['attributes']['episodeNumber'],
|
||||
@@ -176,6 +168,9 @@ def episodes(item):
|
||||
if itemlist: itemlist.sort(key=lambda it: (int(it.season), int(it.episode)))
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
return support.server(item, itemlist=[item.clone(server='directo', action='play')])
|
||||
|
||||
def play(item):
|
||||
if item.livefilter:
|
||||
|
||||
@@ -60,7 +60,7 @@ def movies(item):
|
||||
args = item.args
|
||||
args[0] += 1
|
||||
support.nextPage(itemlist, item, next_page=item.url, "movies")
|
||||
# itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), args=args, thumbnail=support.thumb()))
|
||||
# itemlist.append(item.clone(title=support.typo(support.config.getLocalizedString(30992), 'color kod bold'), args=args, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
+32
-29
@@ -24,8 +24,8 @@ headers = {
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['', 'live']),
|
||||
('Replay {bold}', ['', 'replay_channels'])]
|
||||
top = [('Dirette {bullet bold}', ['', 'live']),
|
||||
('Replay {bullet bold}', ['', 'replay_channels'])]
|
||||
|
||||
menu = [('Programmi TV {bullet bold}', ['/tutti-i-programmi', 'movies', '', 'tvshow']),
|
||||
('Teche La7 {bullet bold}', ['/i-protagonisti', 'movies', '', 'tvshow'])]
|
||||
@@ -35,14 +35,14 @@ def mainlist(item):
|
||||
|
||||
|
||||
def live(item):
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/dirette-tv', action='play', forcethumb = True, no_return=True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/live-la7d', action='play', forcethumb = True, no_return=True)]
|
||||
itemlist = [item.clone(title='La7', fulltitle='La7', url= host + '/dirette-tv', action='findvideos', forcethumb = True),
|
||||
item.clone(title='La7d', fulltitle='La7d', url= host + '/live-la7d', action='findvideos', forcethumb = True)]
|
||||
return support.thumb(itemlist, mode='live')
|
||||
|
||||
|
||||
def replay_channels(item):
|
||||
itemlist = [item.clone(title=support.typo('La7', 'bold'), fulltitle='La7', url= host + '/rivedila7/0/la7', action='replay_menu', forcethumb = True),
|
||||
item.clone(title=support.typo('La7d', 'bold'), fulltitle='La7d', url= host + '/rivedila7/0/la7d', action='replay_menu', forcethumb = True)]
|
||||
itemlist = [item.clone(title='La7', fulltitle='La7', url= host + '/rivedila7/0/la7', action='replay_menu', forcethumb = True),
|
||||
item.clone(title='La7d', fulltitle='La7d', url= host + '/rivedila7/0/la7d', action='replay_menu', forcethumb = True)]
|
||||
return support.thumb(itemlist, mode='live')
|
||||
|
||||
|
||||
@@ -51,17 +51,17 @@ def replay_menu(item):
|
||||
action = 'replay'
|
||||
patron = r'href="(?P<url>[^"]+)"><div class="giorno-text">\s*(?P<day>[^>]+)</div><[^>]+>\s*(?P<num>[^<]+)</div><[^>]+>\s*(?P<month>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.title = support.typo(item.day + ' ' + item.num + ' ' + item.month,'bold')
|
||||
item.title = '{} {} {}'.format(item.day, item.num, item.month)
|
||||
return item
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def replay(item):
|
||||
action = 'play'
|
||||
action = 'findvideos'
|
||||
patron = r'guida-tv"><[^>]+><[^>]+>(?P<hour>[^<]+)<[^>]+><[^>]+><[^>]+>\s*<a href="(?P<url>[^"]+)"><[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"><[^>]+><[^>]+><[^>]+><[^>]+>\s*(?P<name>[^<]+)<[^>]+><[^>]+><[^>]+>(?P<plot>[^<]+)<'
|
||||
def itemHook(item):
|
||||
item.title = support.typo(item.hour + ' - ' + item.name,'bold')
|
||||
item.title = '{} - {}'.format(item.hour, item.name)
|
||||
item.contentTitle = item.fulltitle = item.show = item.name
|
||||
item.thumbnail = 'http:' + item.t
|
||||
item.fanart = item.thumbnail
|
||||
@@ -85,14 +85,18 @@ def search(item, text):
|
||||
@support.scrape
|
||||
def movies(item):
|
||||
search = item.search
|
||||
tmdbEnabled = False
|
||||
videlibraryEnabled = False
|
||||
downloadEnabled = False
|
||||
disableAll = True
|
||||
action = 'episodes'
|
||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"></div><div class="titolo">\s*(?P<title>[^<]+)<'
|
||||
def itemHook(item):
|
||||
logger.debug(item)
|
||||
item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
|
||||
prepose = ''
|
||||
if item.t.startswith('//'):
|
||||
prepose = 'http:'
|
||||
elif item.t.startswith('/'):
|
||||
prepose = host
|
||||
elif not item.t.startswith('http'):
|
||||
prepose = host + '/'
|
||||
item.thumbnail = prepose + item.t
|
||||
item.fanart = item.thumb
|
||||
return item
|
||||
return locals()
|
||||
@@ -101,8 +105,7 @@ def movies(item):
|
||||
@support.scrape
|
||||
def episodes(item):
|
||||
data = support.match(item).data
|
||||
# debug = True
|
||||
action = 'play'
|
||||
action = 'findvideos'
|
||||
if '>puntate<' in data:
|
||||
patronBlock = r'>puntate<(?P<block>.*?)home-block-outbrain'
|
||||
url = support.match(data, patron=r'>puntate<[^>]+>[^>]+>[^>]+><a href="([^"]+)"').match
|
||||
@@ -119,10 +122,10 @@ def episodes(item):
|
||||
def itemHook(item):
|
||||
if item.Thumb: item.t = item.Thumb
|
||||
item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
|
||||
if item.Title: item.title = support.typo(item.Title, 'bold')
|
||||
if item.Title: item.title = item.Title
|
||||
if item.date:
|
||||
item.title = support.re.sub(r'[Pp]untata (?:del )?\d+/\d+/\d+', '', item.title)
|
||||
item.title += support.typo(item.date, '_ [] bold')
|
||||
item.title = '{} [{}]'.format(item.title, item.date)
|
||||
if item.desc: item.plot = item.desc
|
||||
item.forcethumb = True
|
||||
item.fanart = item.thumbnail
|
||||
@@ -130,21 +133,16 @@ def episodes(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
return support.server(item, itemlist=[item.clone(server='directo', action='play')])
|
||||
|
||||
def play(item):
|
||||
logger.debug()
|
||||
if item.livefilter:
|
||||
for it in live(item):
|
||||
if it.fulltitle == item.livefilter:
|
||||
item = it
|
||||
break
|
||||
data = support.match(item).data
|
||||
match = support.match(data, patron='/content/entry/data/(.*?).mp4').match
|
||||
if match:
|
||||
url = 'https://awsvodpkg.iltrovatore.it/local/hls/,/content/entry/data/' + support.match(item, patron='/content/entry/data/(.*?).mp4').match + '.mp4.urlset/master.m3u8'
|
||||
item = item.clone(title='Direct', url=url, server='directo', action='play')
|
||||
else:
|
||||
url = support.match(data, patron=r'''["]?dash["]?\s*:\s*["']([^"']+)["']''').match
|
||||
if url:
|
||||
preurl = support.match(data, patron=r'preTokenUrl = "(.+?)"').match
|
||||
url = support.match(data, patron=r'''["]?dash["]?\s*:\s*["']([^"']+)["']''').match
|
||||
tokenHeader = {
|
||||
'host': headers['host_token'],
|
||||
'user-agent': headers['user-agent'],
|
||||
@@ -171,4 +169,9 @@ def play(item):
|
||||
lic_url='%s|%s|R{SSM}|'%(license_url, preLic)
|
||||
item.drm = DRM
|
||||
item.license = lic_url
|
||||
else:
|
||||
match = support.match(data, patron='/content/entry/data/(.*?).mp4').match
|
||||
if match:
|
||||
url = 'https://awsvodpkg.iltrovatore.it/local/hls/,/content/entry/data/' + support.match(item, patron='/content/entry/data/(.*?).mp4').match + '.mp4.urlset/master.m3u8'
|
||||
item = item.clone(url=url, server='directo', action='play')
|
||||
return support.servertools.find_video_items(item, data=url)
|
||||
|
||||
@@ -38,7 +38,7 @@ session.headers.update({'authorization': 'Bearer ' + Token})
|
||||
sessionKey = session.get(sessionUrl.format(uuid=str(uuid.uuid4())), verify=False).json()['sessionKey']
|
||||
session.headers.update({'x-session': sessionKey})
|
||||
|
||||
pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.get_setting('pagination', 'mediasetplay')]
|
||||
pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.getSetting('pagination', 'mediasetplay')]
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -224,7 +224,7 @@ def episodes(item):
|
||||
def play(item):
|
||||
logger.debug()
|
||||
item.no_return=True
|
||||
mpd = config.get_setting('mpd', item.channel)
|
||||
mpd = config.getSetting('mpd', item.channel)
|
||||
|
||||
|
||||
lic_url = 'https://widevine.entitlement.theplatform.eu/wv/web/ModularDrm/getRawWidevineLicense?releasePid={pid}&account=http://access.auth.theplatform.com/data/Account/2702976343&schema=1.0&token={token}|Accept=*/*&Content-Type=&User-Agent={ua}|R{{SSM}}|'
|
||||
|
||||
@@ -25,7 +25,7 @@ def mainlist(item):
|
||||
itemlist.append(
|
||||
support.Item(
|
||||
channel=item.channel,
|
||||
title=support.typo(config.get_localized_string(70741) % 'Musica… ', 'bold'),
|
||||
title=support.typo(config.getLocalizedString(70741) % 'Musica… ', 'bold'),
|
||||
contentType='music',
|
||||
url=item.url,
|
||||
action='search',
|
||||
|
||||
+7
-7
@@ -100,8 +100,8 @@ def episodes(item):
|
||||
items = item.data
|
||||
elif item.season_url:
|
||||
items = requests.get(item.season_url).json()['items']
|
||||
elif item.video_url:
|
||||
items = requests.get(item.video_url).json()['blocks']
|
||||
elif item.videoUrl:
|
||||
items = requests.get(item.videoUrl).json()['blocks']
|
||||
|
||||
if 'sets' in items[0]:
|
||||
if len(items) > 1:
|
||||
@@ -119,7 +119,7 @@ def episodes(item):
|
||||
|
||||
|
||||
def epMenu(item):
|
||||
video_url = ''
|
||||
videoUrl = ''
|
||||
itemlist = []
|
||||
for it in item.data:
|
||||
if 'sets' in it:
|
||||
@@ -141,7 +141,7 @@ def live(item):
|
||||
current = it['currentItem']
|
||||
next = it['nextItem']
|
||||
plot = '[B]{}[/B]\n{}\n\nA Seguire: [B]{}[/B]\n{}'.format(current['name'], current['description'], next['name'], next['description'])
|
||||
itemlist.append(item.clone(title=title, fulltitle=title, fanart=fanart, plot=plot, url=url, video_url=url + '.json', action='play'))
|
||||
itemlist.append(item.clone(title=title, fulltitle=title, fanart=fanart, plot=plot, url=url, videoUrl=url + '.json', action='play'))
|
||||
itemlist.sort(key=lambda it: support.channels_order.get(it.fulltitle, 999))
|
||||
support.thumb(itemlist, mode='live')
|
||||
return itemlist
|
||||
@@ -206,7 +206,7 @@ def replay(item):
|
||||
fanart = image,
|
||||
plot = info['description'],
|
||||
url = getUrl(it['weblink']),
|
||||
video_url = getUrl(it['path_id']),
|
||||
videoUrl = getUrl(it['path_id']),
|
||||
action = 'play',
|
||||
forcethumb = True)
|
||||
|
||||
@@ -228,7 +228,7 @@ def replay(item):
|
||||
def play(item):
|
||||
logger.debug()
|
||||
|
||||
res = requests.get(item.video_url).json()
|
||||
res = requests.get(item.videoUrl).json()
|
||||
|
||||
if 'first_item_path' in res:
|
||||
res = requests.get(getUrl(res['first_item_path'])).json()
|
||||
@@ -279,7 +279,7 @@ def addinfo(items, item):
|
||||
thumbnail= getUrl(thumb),
|
||||
fanart=getUrl(fanart),
|
||||
url=getUrl(key.get('weblink', '')),
|
||||
video_url=getUrl(key['path_id']),
|
||||
videoUrl=getUrl(key['path_id']),
|
||||
plot=info.get('description', ''))
|
||||
|
||||
if 'Genere' not in key.get('sub_type', '') and ('layout' not in key or key['layout'] == 'single'):
|
||||
|
||||
@@ -55,7 +55,7 @@ def findvideos(item):
|
||||
data = re.sub(r'\n|\t|\s+', ' ', data)
|
||||
# recupero il blocco contenente i link
|
||||
blocco = scrapertools.find_single_match(data, r'<div class="entry">([\s\S.]*?)<div class="post').replace('..:: Episodio ', 'Episodio ').strip()
|
||||
matches = scrapertools.find_multiple_matches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
matches = scrapertools.findMultipleMatches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
if len(matches) > 0:
|
||||
for fullseasonepisode, season, episode in matches:
|
||||
blocco = blocco.replace(fullseasonepisode + ' ', 'Episodio ' + episode + ' ')
|
||||
@@ -67,7 +67,7 @@ def findvideos(item):
|
||||
logger.debug(patron)
|
||||
logger.debug(blocco)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(blocco, patron)
|
||||
matches = scrapertools.findMultipleMatches(blocco, patron)
|
||||
if len(matches):
|
||||
data = matches[0][0]
|
||||
|
||||
@@ -78,7 +78,7 @@ def findvideos(item):
|
||||
['Referer', keeplinks]]
|
||||
|
||||
html = httptools.downloadpage(keeplinks, headers=headers2).data
|
||||
data += str(scrapertools.find_multiple_matches(html, '</lable><a href="([^"]+)" target="_blank"'))
|
||||
data += str(scrapertools.findMultipleMatches(html, '</lable><a href="([^"]+)" target="_blank"'))
|
||||
|
||||
return support.server(item, data=data)
|
||||
|
||||
@@ -157,7 +157,7 @@ def episodes(item, itemlist=[]):
|
||||
blocco = scrapertools.find_single_match(data, r'<div class="entry">[\s\S.]*?<div class="post')
|
||||
blocco = blocco.replace('<strong>Episodio ', '<strong>Episodio ').replace(' </strong>', ' </strong>')
|
||||
blocco = blocco.replace('<strong>Episodio ', '<strong>S' + season.zfill(2) + 'E')
|
||||
matches = scrapertools.find_multiple_matches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
matches = scrapertools.findMultipleMatches(blocco, r'(S(\d*)E(\d*))\s')
|
||||
episodes = []
|
||||
if len(matches) > 0:
|
||||
for fullepisode_s, season, episode in matches:
|
||||
@@ -173,7 +173,7 @@ def episodes(item, itemlist=[]):
|
||||
title = scrapedtitle.split(" S0")[0].strip()
|
||||
title = title.split(" S1")[0].strip()
|
||||
title = title.split(" S2")[0].strip()
|
||||
episodes = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
episodes = scrapertools.findMultipleMatches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
|
||||
for fullepisode, season, episode in episodes:
|
||||
infoLabels = {}
|
||||
@@ -227,7 +227,7 @@ def movies_tv(item):
|
||||
scrapedplot = ""
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
infoLabels = {}
|
||||
episode = scrapertools.find_multiple_matches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
episode = scrapertools.findMultipleMatches(scrapedtitle, r'((\d*)x(\d*))')
|
||||
if episode: # workaround per quando mettono le serie intere o altra roba, sarebbero da intercettare TODO
|
||||
episode = episode[0]
|
||||
title = scrapedtitle.split(" S0")[0].strip()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import json, requests, sys
|
||||
from core import support, channeltools
|
||||
from core import support, channeltools, jsontools
|
||||
from platformcode import config, logger
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
@@ -12,28 +12,34 @@ else:
|
||||
from concurrent_py2 import futures
|
||||
|
||||
def findhost(url):
|
||||
return 'https://' + support.match(url, patron='var domain\s*=\s*"([^"]+)').match
|
||||
matches = support.match(url, patron='<a href="([^"]+)" target="_blank"').matches
|
||||
if matches:
|
||||
return matches[-1]
|
||||
|
||||
host = support.config.get_channel_url(findhost)
|
||||
session = requests.Session()
|
||||
headers = {}
|
||||
perpage = config.get_setting('pagination', 'streamingcommunity', default=1) * 10 + 10
|
||||
perpage = config.getSetting('pagination', 'streamingcommunity', default=1) * 10 + 10
|
||||
|
||||
def getHeaders():
|
||||
def getHeaders(forced=False):
|
||||
global headers
|
||||
global host
|
||||
# support.dbg()
|
||||
if not headers:
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'}
|
||||
response = session.get(host, headers=headers)
|
||||
if response.status_code != 200 or response.url != host:
|
||||
try:
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'}
|
||||
response = session.get(host, headers=headers)
|
||||
if not response.url.startswith(host):
|
||||
host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': host,
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie': '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
except:
|
||||
host = support.config.get_channel_url(findhost, forceFindhost=True)
|
||||
csrf_token = support.match(response.text, patron='name="csrf-token" content="([^"]+)"').match
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': host,
|
||||
'x-csrf-token': csrf_token,
|
||||
'Cookie': '; '.join([x.name + '=' + x.value for x in response.cookies])}
|
||||
if not forced: getHeaders(True)
|
||||
|
||||
getHeaders()
|
||||
|
||||
@support.menu
|
||||
@@ -118,6 +124,7 @@ def movies(item):
|
||||
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 = session.post(host + '/api/browse', headers=headers, data=payload).json()['records']
|
||||
@@ -131,6 +138,8 @@ def movies(item):
|
||||
js += record
|
||||
else:
|
||||
js = records
|
||||
|
||||
logger.debug(jsontools.dump(js))
|
||||
|
||||
itemlist = makeItems(item, js)
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ def findvideos(item):
|
||||
item.contentType = 'movie'
|
||||
|
||||
# if 'protectlink' in data:
|
||||
# urls = scrapertools.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
# urls = scrapertools.findMultipleMatches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
# logger.debug("SONO QUI: ", urls)
|
||||
# for url in urls:
|
||||
# url = url.decode('base64')
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ def mainlist(item):
|
||||
return item
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.append(
|
||||
item.clone(title=support.typo(config.get_localized_string(70741) % 'Musica… ', 'bold'), action='search', thumbnail=support.thumb('search')))
|
||||
item.clone(title=support.typo(config.getLocalizedString(70741) % 'Musica… ', 'bold'), action='search', thumbnail=support.thumb('search')))
|
||||
support.channel_config(item, itemlist)
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
+2
-6
@@ -140,10 +140,6 @@ def movies(item):
|
||||
|
||||
def episodes(item):
|
||||
itemlist = []
|
||||
if config.get_setting("window_type") == 0:
|
||||
item.window = True
|
||||
item.folder = False
|
||||
|
||||
if item.episodes:
|
||||
episodes = item.episodes
|
||||
show_id = item.show_id
|
||||
@@ -202,7 +198,7 @@ def findvideos(item):
|
||||
url = url.split()[-1]
|
||||
itemlist.append(
|
||||
item.clone(action= 'play',
|
||||
title=config.get_localized_string(30137),
|
||||
title=config.getLocalizedString(30137),
|
||||
url= 'https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/' + url,
|
||||
server= 'directo')
|
||||
)
|
||||
@@ -212,7 +208,7 @@ def findvideos(item):
|
||||
|
||||
itemlist.append(
|
||||
item.clone(action= 'play',
|
||||
title=config.get_localized_string(30137),
|
||||
title=config.getLocalizedString(30137),
|
||||
url= item.url + '?' + key,
|
||||
server= 'directo'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user