VVVVID Aggiunti Film e Serie
(problemi con la rinumerazione)
This commit is contained in:
+105
-59
@@ -5,6 +5,7 @@
|
|||||||
import requests, re
|
import requests, re
|
||||||
from core import support, tmdb
|
from core import support, tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
|
from specials import autorenumber
|
||||||
|
|
||||||
__channel__ = "vvvvid"
|
__channel__ = "vvvvid"
|
||||||
host = support.config.get_channel_url(__channel__)
|
host = support.config.get_channel_url(__channel__)
|
||||||
@@ -19,70 +20,79 @@ 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/',
|
||||||
('In Evidenza',['/anime/channel/10005/last/', 'peliculas', 'sort']),
|
('In Evidenza',['anime/', 'peliculas', 'channel/10005/last/']),
|
||||||
('Popolari',['/anime/channel/10003/last/', 'peliculas', 'sort']),
|
('Popolari',['anime/', 'peliculas', 'channel/10002/last/']),
|
||||||
('Nuove Uscite',['/anime/channel/10007/last/', 'peliculas', 'sort']),
|
('Nuove Uscite',['anime/', 'peliculas', 'channel/10007/last/']),
|
||||||
('Generi',['/anime/channels/', 'peliculas', '/anime/channel/10004/last/?category=']),
|
('Generi',['anime/', 'peliculas', 'channel/10004/last/?category=']),
|
||||||
('A-Z',['/anime/channels/', 'peliculas', '/anime/channel/10003/last/?filter=']),
|
('A-Z',['anime/', 'peliculas', 'channel/10003/last/?filter='])
|
||||||
('Extra',['/anime/channels/', 'peliculas', '/anime/channel/10010/last/?extras='])
|
]
|
||||||
|
film = ['film/',
|
||||||
|
('In Evidenza',['film/', 'peliculas', 'channel/10005/last/']),
|
||||||
|
('Popolari',['film/', 'peliculas', 'channel/10002/last/']),
|
||||||
|
('Nuove Uscite',['film/', 'peliculas', 'channel/10007/last/']),
|
||||||
|
('Generi',['film/', 'peliculas', 'channel/10004/last/?category=']),
|
||||||
|
('A-Z',['film/', 'peliculas', 'channel/10003/last/?filter=']),
|
||||||
|
]
|
||||||
|
tvshow = ['series/',
|
||||||
|
('In Evidenza',['series/', 'peliculas', 'channel/10005/last/']),
|
||||||
|
('Popolari',['series/', 'peliculas', 'channel/10002/last/']),
|
||||||
|
('Nuove Uscite',['series/', 'peliculas', 'channel/10007/last/']),
|
||||||
|
('Generi',['series/', 'peliculas', 'channel/10004/last/?category=']),
|
||||||
|
('A-Z',['series/', 'peliculas', 'channel/10003/last/?filter='])
|
||||||
]
|
]
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
def search(item, text):
|
||||||
|
support.log(text)
|
||||||
|
itemlist = []
|
||||||
|
if 'film' in item.url: item.contentType = 'movie'
|
||||||
|
else: item.contentType = 'tvshow'
|
||||||
|
item.search = text
|
||||||
|
itemlist = peliculas(item)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
itemlist = []
|
itemlist = []
|
||||||
blacklist = ['Generi','A - Z', 'Extra']
|
if not item.args:
|
||||||
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
json_file = current_session.get(item.url + 'channels', headers=headers, params=payload).json()
|
||||||
support.log(json_file)
|
names = [i['filter'] for i in json_file['data'] if 'filter' in i][0]
|
||||||
if 'data' in json_file:
|
for name in names:
|
||||||
if not item.args:
|
url = item.url + 'channel/10003/last/?filter=' + str(name)
|
||||||
names = [i['filter'] for i in json_file['data'] if 'filter' in i][0]
|
json_file = current_session.get(url, headers=headers, params=payload).json()
|
||||||
for name in names:
|
if 'data' in json_file:
|
||||||
support.log(name)
|
|
||||||
url = item.url + '10003/last/?filter=' + str(name)
|
|
||||||
json_file = current_session.get(url, headers=headers, params=payload).json()
|
json_file = current_session.get(url, headers=headers, params=payload).json()
|
||||||
if 'data' in json_file:
|
make_itemlist(itemlist, item, json_file)
|
||||||
json_file = current_session.get(url, headers=headers, params=payload).json()
|
|
||||||
for key in json_file['data']:
|
elif ('=' not in item.args) and ('=' not in item.url):
|
||||||
support.log(key['thumbnail'])
|
json_file = current_session.get(item.url + item.args, headers=headers, params=payload).json()
|
||||||
itemlist.append(
|
for key in json_file['data']:
|
||||||
Item(
|
make_itemlist(itemlist, item, json_file)
|
||||||
channel = item.channel,
|
|
||||||
title = key['title'],
|
elif '=' in item.args:
|
||||||
fulltitle= key['title'],
|
json_file = current_session.get(item.url + 'channels', headers=headers, params=payload).json()
|
||||||
show= key['title'],
|
Filter = support.match(item.args,r'\?([^=]+)=')[0][0]
|
||||||
url= host + '/' + str(key['show_id']) + '/seasons/',
|
keys = [i[Filter] for i in json_file['data'] if Filter in i][0]
|
||||||
action= 'episodios'
|
for key in keys:
|
||||||
))
|
if key not in ['1','2']:
|
||||||
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(
|
itemlist.append(
|
||||||
Item(channel = item.channel,
|
Item(channel = item.channel,
|
||||||
title = key if Filter == 'filter' else key['name'],
|
title = support.typo(key.upper() if Filter == 'filter' else key['name'], 'bold'),
|
||||||
url = host + item.args + (key if Filter == 'filter' else str(key['id'])),
|
url = item.url + item.args + (key if Filter == 'filter' else str(key['id'])),
|
||||||
action = 'peliculas',
|
action = 'peliculas',
|
||||||
args = 'sort'))
|
args = 'filters',
|
||||||
|
contentType = item.contentType))
|
||||||
|
|
||||||
|
else :
|
||||||
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
|
make_itemlist(itemlist, item, json_file)
|
||||||
|
if item.contentType != 'movie': autorenumber.renumber(itemlist)
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -90,30 +100,66 @@ 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)
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
channel = item.channel,
|
channel = item.channel,
|
||||||
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'],
|
||||||
|
contentType = item.contentType
|
||||||
))
|
))
|
||||||
|
autorenumber.renumber(itemlist, item, 'bold')
|
||||||
|
support.videolibrary(itemlist,item)
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
from lib import vvvvid_decoder
|
from lib import vvvvid_decoder
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
if item.contentType == 'movie':
|
||||||
|
json_file = current_session.get(item.url, headers=headers, params=payload).json()
|
||||||
|
item.url = host + str(json_file['data'][0]['show_id']) + '/season/' + str(json_file['data'][0]['episodes'][0]['season_id']) + '/'
|
||||||
|
item.video_id = json_file['data'][0]['episodes'][0]['video_id']
|
||||||
|
|
||||||
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'])
|
|
||||||
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'] or 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'
|
if 'https' not in item.url:
|
||||||
return support.server(item)
|
url = support.match(item, url='https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/playlist.m3u')[1]
|
||||||
|
url = url.split()[-1]
|
||||||
|
itemlist.append(
|
||||||
|
Item(action= 'play',
|
||||||
|
title='direct',
|
||||||
|
url= 'https://or01.top-ix.org/videomg/_definst_/mp4:' + item.url + '/' + url,
|
||||||
|
server= 'directo')
|
||||||
|
)
|
||||||
|
return support.server(item, itemlist=itemlist)
|
||||||
|
|
||||||
|
def make_itemlist(itemlist, item, data):
|
||||||
|
search = item.search if item.search else ''
|
||||||
|
infoLabels = {}
|
||||||
|
for key in data['data']:
|
||||||
|
if search.lower() in key['title'].lower():
|
||||||
|
infoLabels['year'] = key['date_published']
|
||||||
|
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
||||||
|
support.log(infoLabels)
|
||||||
|
itemlist.append(
|
||||||
|
Item(
|
||||||
|
channel = item.channel,
|
||||||
|
title = support.typo(key['title'], 'bold'),
|
||||||
|
fulltitle= key['title'],
|
||||||
|
show= key['title'],
|
||||||
|
url= host + str(key['show_id']) + '/seasons/',
|
||||||
|
action= 'findvideos' if item.contentType == 'movie' else 'episodios',
|
||||||
|
contentType = item.contentType,
|
||||||
|
contentSerieName= key['title'] if item.contentType != 'movie' else '',
|
||||||
|
contentTitle= key['title'] if item.contentType == 'movie' else '',
|
||||||
|
thumbnail= key['thumbnail'],
|
||||||
|
infoLabels=infoLabels
|
||||||
|
))
|
||||||
|
return itemlist
|
||||||
@@ -3,6 +3,11 @@
|
|||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "((?:http://|https://).*?m3u8)",
|
||||||
|
"url": "\\1"
|
||||||
|
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pattern": "(http://[a-zA-Z0-9]+\\.mysites\\.com\\/get_file\\/.*?\\.mp4)",
|
"pattern": "(http://[a-zA-Z0-9]+\\.mysites\\.com\\/get_file\\/.*?\\.mp4)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
@@ -35,7 +40,7 @@
|
|||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
"id": "directo",
|
"id": "directo",
|
||||||
"name": "directo",
|
"name": "direct",
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
"default": false,
|
"default": false,
|
||||||
|
|||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from platformcode import logger
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
# Returns an array of possible video url's from the page_url
|
# Returns an array of possible video url's from the page_url
|
||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
logger.info('PAGE URL= ' + page_url)
|
||||||
|
|
||||||
video_urls = [["%s [directo]" % page_url[-4:], page_url]]
|
video_urls = [["%s %s" % (page_url[-4:], config.get_localized_string(30137)), page_url]]
|
||||||
|
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
|
||||||
"pattern": "(https://vvvvid-vh.akamaihd.net/i/.*?m3u8)",
|
|
||||||
"url": "\\1"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"pattern": "https://www.vvvvid.it/.*?show/([a-z0-9/-]+)",
|
"pattern": "https://www.vvvvid.it/.*?show/([a-z0-9/-]+)",
|
||||||
"url": "https://www.vvvvid.it/show/\\1"
|
"url": "https://www.vvvvid.it/show/\\1"
|
||||||
|
|||||||
+21
-27
@@ -27,37 +27,31 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
video_urls = []
|
video_urls = []
|
||||||
# if Direct
|
|
||||||
if 'm3u8' in page_url:
|
|
||||||
filename = '[B]' + re.findall('/([a-zA-Z0-9_]+.mp4)', page_url)[0] + '[/B]'
|
|
||||||
video_urls.append([filename, str(page_url)])
|
|
||||||
|
|
||||||
# if Page
|
|
||||||
else:
|
|
||||||
page_url = page_url.replace("/show/","/#!show/")
|
|
||||||
|
|
||||||
# Getting info from given URL
|
page_url = page_url.replace("/show/","/#!show/")
|
||||||
show_id = re.findall("#!show/([0-9]+)/", page_url)[0]
|
|
||||||
name = re.findall(show_id + "/(.+?)/", page_url)[0]
|
|
||||||
season_id = re.findall(name + "/(.+?)/", page_url)[0]
|
|
||||||
video_id = re.findall(season_id + "/(.+?)/", page_url)[0]
|
|
||||||
|
|
||||||
# Getting info from Site
|
|
||||||
json_url = "https://www.vvvvid.it/vvvvid/ondemand/" + show_id + '/season/' +season_id + '/'
|
|
||||||
# logger.info('URL= ' + json_url)
|
|
||||||
json_file = current_session.get(json_url, headers=headers, params=payload).json()
|
|
||||||
# logger.info(json_file['data'])
|
|
||||||
|
|
||||||
# Search for the correct episode
|
# Getting info from given URL
|
||||||
for episode in json_file['data']:
|
show_id = re.findall("#!show/([0-9]+)/", page_url)[0]
|
||||||
# import web_pdb; web_pdb.set_trace()
|
name = re.findall(show_id + "/(.+?)/", page_url)[0]
|
||||||
if episode['video_id'] == int(video_id):
|
season_id = re.findall(name + "/(.+?)/", page_url)[0]
|
||||||
ep_title = '[B]' + episode['title'] + '[/B]'
|
video_id = re.findall(season_id + "/(.+?)/", page_url)[0]
|
||||||
embed_info = vvvvid_decoder.dec_ei(episode['embed_info'])
|
|
||||||
embed_info = embed_info.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
|
||||||
|
|
||||||
|
# Getting info from Site
|
||||||
|
json_url = "https://www.vvvvid.it/vvvvid/ondemand/" + show_id + '/season/' +season_id + '/'
|
||||||
|
# logger.info('URL= ' + json_url)
|
||||||
|
json_file = current_session.get(json_url, headers=headers, params=payload).json()
|
||||||
|
logger.info(json_file['data'])
|
||||||
|
|
||||||
|
# Search for the correct episode
|
||||||
|
for episode in json_file['data']:
|
||||||
# import web_pdb; web_pdb.set_trace()
|
# import web_pdb; web_pdb.set_trace()
|
||||||
|
if episode['video_id'] == int(video_id):
|
||||||
|
ep_title = '[B]' + episode['title'] + '[/B]'
|
||||||
|
embed_info = vvvvid_decoder.dec_ei(episode['embed_info'])
|
||||||
|
embed_info = embed_info.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
|
||||||
|
|
||||||
video_urls.append([ep_title, str(embed_info)])
|
# import web_pdb; web_pdb.set_trace()
|
||||||
|
|
||||||
|
video_urls.append([ep_title, str(embed_info)])
|
||||||
|
|
||||||
return video_urls
|
return video_urls
|
||||||
Reference in New Issue
Block a user