Fix streamZ
This commit is contained in:
+10
-6
@@ -1,11 +1,12 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Conector Streamz By Alfa development Group
|
# Conector Streamz
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from core import httptools
|
from core import httptools, scrapertools
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
from lib import jsunpack
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
@@ -14,16 +15,19 @@ def test_video_exists(page_url):
|
|||||||
data = httptools.downloadpage(page_url)
|
data = httptools.downloadpage(page_url)
|
||||||
|
|
||||||
if "<b>File not found, sorry!</b" in data.data:
|
if "<b>File not found, sorry!</b" in data.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 = []
|
||||||
|
packed_data = scrapertools.find_single_match(data.data, r'(function\(p,a,c,k,e,d\)[^<]+)')
|
||||||
url = re.sub(r'(\.\w{2,3})/\w', '\\1/getlink-', data.url) + '.dll'
|
if packed_data:
|
||||||
|
url = scrapertools.find_single_match(jsunpack.unpack(packed_data), r"src:\\'([^'\\]+)")
|
||||||
|
else:
|
||||||
|
url = re.sub(r'(\.\w{2,3})/\w', '\\1/getl1nk-', data.url) + '.dll'
|
||||||
url += "|User-Agent=%s" % httptools.get_user_agent()
|
url += "|User-Agent=%s" % httptools.get_user_agent()
|
||||||
video_urls.append([".mp4 [Streamz]", url])
|
video_urls.append([".mp4 [streamZ]", url])
|
||||||
|
|
||||||
return video_urls
|
return video_urls
|
||||||
Reference in New Issue
Block a user