Aggiornamenti VVVVID (ancora in beta)
This commit is contained in:
+61
-31
@@ -3,7 +3,7 @@
|
|||||||
# Canale per vvvvid
|
# Canale per vvvvid
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
import requests, re
|
import requests, re
|
||||||
from core import support, jsontools
|
from core import support, tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
|
|
||||||
__channel__ = "vvvvid"
|
__channel__ = "vvvvid"
|
||||||
@@ -19,52 +19,80 @@ conn_id = current_session.get(login_page, headers=headers).json()['data']['conn_
|
|||||||
payload = {'conn_id': conn_id}
|
payload = {'conn_id': conn_id}
|
||||||
|
|
||||||
main_host = host
|
main_host = host
|
||||||
host += '/vvvvid/ondemand/'
|
host += '/vvvvid/ondemand'
|
||||||
list_servers = ['vvvvid']
|
list_servers = ['vvvvid']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
anime = ['/anime/channels']
|
anime = ['/anime/channels/',
|
||||||
|
('In Evidenza',['/anime/channel/10005/last/', 'peliculas', 'sort']),
|
||||||
|
('Popolari',['/anime/channel/10003/last/', 'peliculas', 'sort']),
|
||||||
|
('Nuove Uscite',['/anime/channel/10007/last/', 'peliculas', 'sort']),
|
||||||
|
('Generi',['/anime/channels/', 'peliculas', '/anime/channel/10004/last/?category=']),
|
||||||
|
('A-Z',['/anime/channels/', 'peliculas', '/anime/channel/10003/last/?filter=']),
|
||||||
|
('Extra',['/anime/channels/', 'peliculas', '/anime/channel/10010/last/?extras='])
|
||||||
|
]
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
blacklist = ['Generi','A - Z', 'Extra']
|
||||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
support.log(json_file['data'])
|
support.log(json_file)
|
||||||
if 'channels' in item.url:
|
if 'data' in json_file:
|
||||||
for key in json_file['data']:
|
if not item.args:
|
||||||
itemlist.append(
|
names = [i['filter'] for i in json_file['data'] if 'filter' in i][0]
|
||||||
Item(
|
for name in names:
|
||||||
channel = item.channel,
|
support.log(name)
|
||||||
title = key['name'],
|
url = item.url + '10003/last/?filter=' + str(name)
|
||||||
url = host + 'anime/channel/' + str(key['id']) + '/last/',
|
json_file = current_session.get(url, headers=headers, params=payload).json()
|
||||||
action = 'peliculas'
|
if 'data' in json_file:
|
||||||
)
|
json_file = current_session.get(url, headers=headers, params=payload).json()
|
||||||
)
|
for key in json_file['data']:
|
||||||
else:
|
support.log(key['thumbnail'])
|
||||||
for key in json_file['data']:
|
itemlist.append(
|
||||||
itemlist.append(
|
Item(
|
||||||
Item(
|
channel = item.channel,
|
||||||
channel = item.channel,
|
title = key['title'],
|
||||||
title = key['title'],
|
fulltitle= key['title'],
|
||||||
fulltitle= key['title'],
|
show= key['title'],
|
||||||
show= key['title'],
|
url= host + '/' + str(key['show_id']) + '/seasons/',
|
||||||
url= host + str(key['show_id']) + '/seasons/',
|
action= 'episodios'
|
||||||
action= 'episodios',
|
))
|
||||||
thumbnail= key['thumbnail']
|
elif item.args == 'sort':
|
||||||
)
|
for key in json_file['data']:
|
||||||
)
|
for key in json_file['data']:
|
||||||
|
itemlist.append(
|
||||||
|
Item(
|
||||||
|
channel = item.channel,
|
||||||
|
title = key['title'],
|
||||||
|
fulltitle= key['title'],
|
||||||
|
show= key['title'],
|
||||||
|
url= host + '/' + str(key['show_id']) + '/seasons/',
|
||||||
|
action= 'episodios',
|
||||||
|
thumbnail= key['thumbnail']
|
||||||
|
))
|
||||||
|
elif 'last' in item.args:
|
||||||
|
Filter = support.match(item.args,r'\?([^=]+)=')[0][0]
|
||||||
|
keys = [i[Filter] for i in json_file['data'] if Filter in i][0]
|
||||||
|
for key in keys:
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel = item.channel,
|
||||||
|
title = key if Filter == 'filter' else key['name'],
|
||||||
|
url = host + item.args + (key if Filter == 'filter' else str(key['id'])),
|
||||||
|
action = 'peliculas',
|
||||||
|
args = 'sort'))
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
itemlist = []
|
itemlist = []
|
||||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
show_id = str(json_file['data'][0]['show_id'])
|
show_id = str(json_file['data'][0]['show_id'])
|
||||||
|
|
||||||
for key in json_file['data'][0]['episodes']:
|
for key in json_file['data'][0]['episodes']:
|
||||||
|
support.log(key)
|
||||||
support.log('KEY= ',key)
|
support.log('KEY= ',key)
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
@@ -72,7 +100,7 @@ def episodios(item):
|
|||||||
title = 'Episodio ' + str(key['number']) + ' - ' + key['title'],
|
title = 'Episodio ' + str(key['number']) + ' - ' + key['title'],
|
||||||
fulltitle= item.fulltitle,
|
fulltitle= item.fulltitle,
|
||||||
show= item.show,
|
show= item.show,
|
||||||
url= host + show_id + '/season/' + str(key['season_id']) + '/',
|
url= host + '/' + show_id + '/season/' + str(key['season_id']) + '/',
|
||||||
action= 'findvideos',
|
action= 'findvideos',
|
||||||
video_id= key['video_id']
|
video_id= key['video_id']
|
||||||
))
|
))
|
||||||
@@ -80,10 +108,12 @@ def episodios(item):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
from lib import vvvvid_decoder
|
from lib import vvvvid_decoder
|
||||||
|
itemlist = []
|
||||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
support.log(json_file['data'])
|
support.log(json_file['data'])
|
||||||
for episode in json_file['data']:
|
for episode in json_file['data']:
|
||||||
if episode['video_id'] == item.video_id:
|
if episode['video_id'] == item.video_id:
|
||||||
url = vvvvid_decoder.dec_ei(episode['embed_info'])
|
url = vvvvid_decoder.dec_ei(episode['embed_info'])
|
||||||
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
item.url = url.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
||||||
|
if 'https' not in item.url: item.url = url='https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u'
|
||||||
return support.server(item)
|
return support.server(item)
|
||||||
|
|||||||
+10
-2
@@ -1,4 +1,5 @@
|
|||||||
import urllib2
|
import sys
|
||||||
|
import xbmc
|
||||||
|
|
||||||
def dec_ei(h):
|
def dec_ei(h):
|
||||||
g = 'MNOPIJKL89+/4567UVWXQRSTEFGHABCDcdefYZabstuvopqr0123wxyzklmnghij'
|
g = 'MNOPIJKL89+/4567UVWXQRSTEFGHABCDcdefYZabstuvopqr0123wxyzklmnghij'
|
||||||
@@ -15,7 +16,14 @@ def dec_ei(h):
|
|||||||
d = ''
|
d = ''
|
||||||
for e in range(0,len(c)):
|
for e in range(0,len(c)):
|
||||||
d += '%'+ (('0'+ (str(format(c[e],'x'))))[-2:])
|
d += '%'+ (('0'+ (str(format(c[e],'x'))))[-2:])
|
||||||
return urllib2.unquote(d)
|
|
||||||
|
# if python 3
|
||||||
|
if sys.version_info[0] > 2:
|
||||||
|
import urllib
|
||||||
|
return urllib.parse.unquote(d)
|
||||||
|
else:
|
||||||
|
import urllib2
|
||||||
|
return urllib2.unquote(d)
|
||||||
|
|
||||||
def f(m):
|
def f(m):
|
||||||
l = list()
|
l = list()
|
||||||
|
|||||||
Reference in New Issue
Block a user