Fix altadefinizione (tranne sez. agg.), aggiunto wolfstream
This commit is contained in:
25
servers/wolfstream.json
Normal file
25
servers/wolfstream.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https?://wolfstream\\.tv/(?:embed-|e/)?([a-z0-9]+)",
|
||||
"url": "https://wolfstream.tv/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "wolfstream",
|
||||
"name": "WolfStream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@70708",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
31
servers/wolfstream.py
Normal file
31
servers/wolfstream.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools, scrapertools, support
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.debug("(page_url='%s')" % page_url)
|
||||
page = httptools.downloadpage(page_url)
|
||||
global matches
|
||||
data = page.data
|
||||
|
||||
matches = support.get_jwplayer_mediaurl(data, 'WolfStream')
|
||||
if not matches:
|
||||
data = scrapertools.find_single_match(data,
|
||||
r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||
if data:
|
||||
from lib import jsunpack
|
||||
data = jsunpack.unpack(data)
|
||||
matches = support.get_jwplayer_mediaurl(data, 'WolfStream')
|
||||
|
||||
if not matches: # if not exists, the site just return a page with <video> but not url
|
||||
return False, config.get_localized_string(70449) % "WolfStream"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.debug("url=" + page_url)
|
||||
global matches
|
||||
|
||||
return matches
|
||||
Reference in New Issue
Block a user