aggiunto server supervideo e disabilitato streamtime

This commit is contained in:
mac12m99
2019-11-06 18:32:05 +01:00
committed by marco
parent 2307a53dad
commit 1ba419de43
3 changed files with 81 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
"id": "streamtime",
"name": "StreamTime",
"language": ["ita"],
"active": true,
"active": false,
"adult": false,
"thumbnail": "",
"banner": "streamtime.png",

46
servers/supervideo.json Normal file
View File

@@ -0,0 +1,46 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "supervideo.tv/embed-([a-z0-9]{12}).html",
"url": "https://supervideo.tv/embed-\\1.html"
},
{
"pattern": "supervideo.tv/([a-z0-9]{12})",
"url": "https://supervideo.tv/embed-\\1.html"
}
]
},
"free": true,
"id": "supervideo",
"name": "SuperVideo",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "https://supervideo.tv/images/logo-player.png"
}

34
servers/supervideo.py Normal file
View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
from core import httptools
from core import scrapertoolsV2
from lib import jsunpack
from platformcode import config, logger
import ast
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url, cookies=False).data
if 'File Not Found' in data:
return False, config.get_localized_string(70449) % "SuperVideo"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
code = jsunpack.unpack(scrapertoolsV2.find_single_match(data, "<script type='text/javascript'>(eval.*)"))
match = scrapertoolsV2.find_single_match(code, 'sources:(\[[^]]+\])')
lSrc = ast.literal_eval(match)
lQuality = ['360p', '720p', '1080p', '4k'][:len(lSrc)-1]
lQuality.reverse()
for n, source in enumerate(lSrc):
quality = 'auto' if n==0 else lQuality[n-1]
video_urls.append(['.' + source.split('.')[-1] + '(' + quality + ') [SuperVideo]', source])
return video_urls