Fix streamZ
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"free": true,
|
"free": true,
|
||||||
"id": "streamz",
|
"id": "streamz",
|
||||||
"name": "streamz",
|
"name": "streamZ",
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
"default": false,
|
"default": false,
|
||||||
|
|||||||
+11
-9
@@ -12,22 +12,24 @@ def test_video_exists(page_url):
|
|||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
|
|
||||||
if "<font color=\"red\"><b>File not found, sorry!" in data:
|
if "<font color=\"red\"><b>File not found, sorry!" in data:
|
||||||
return False, config.get_localized_string(70449) % "Streamz"
|
return False, config.get_localized_string(70449) % "streamZ"
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
def get_video_url(page_url, video_password):
|
def get_video_url(page_url, video_password):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
video_urls = []
|
video_urls = []
|
||||||
|
from core.support import match
|
||||||
|
matches = match(data, patron=r'(eval\(function\(p,a,c,k,e,d\).*?)\s+</script>').matches
|
||||||
|
unpacked = ''
|
||||||
|
for packed in matches:
|
||||||
|
unpacked += jsunpack.unpack(packed) + '\n'
|
||||||
|
|
||||||
packed = scrapertools.find_single_match(data, r'(eval\(function\(p,a,c,k,e,d\).*?)\s+</script>')
|
urls = match(unpacked, patron=r"videojs\d+[^;]+[^']+'[^']+'[^']+'(https://streamz.*?/get.*?.dll)").matches
|
||||||
unpacked = jsunpack.unpack(packed)
|
|
||||||
|
|
||||||
url = scrapertools.find_single_match(unpacked, '(https://streamz.*?/get.*?.dll)')
|
for url in urls:
|
||||||
|
url = url + "|User-Agent=%s" % httptools.get_user_agent()
|
||||||
url = url.replace("getmp4", "getlink").replace("getIink", "getlink")
|
if not video_urls or url not in video_urls[-1]:
|
||||||
|
video_urls.append(["[streamZ]", url])
|
||||||
url += "|User-Agent=%s" % httptools.get_user_agent()
|
|
||||||
video_urls.append(["[streamz]", url])
|
|
||||||
|
|
||||||
return video_urls
|
return video_urls
|
||||||
Reference in New Issue
Block a user