Fix streamtape
This commit is contained in:
@@ -2,10 +2,11 @@
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Conector streamtape By Alfa development Group
|
# Conector streamtape By Alfa development Group
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
from core import httptools, scrapertools
|
from core import httptools
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
from core.support import match
|
from core.support import match
|
||||||
import sys
|
import sys
|
||||||
|
from lib import js2py
|
||||||
|
|
||||||
PY3 = False
|
PY3 = False
|
||||||
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
|
||||||
@@ -27,14 +28,9 @@ 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=""):
|
||||||
logger.debug("url=" + page_url)
|
logger.debug("url=" + page_url)
|
||||||
|
|
||||||
video_urls = []
|
video_urls = []
|
||||||
find_url = match(data, patron=r'''innerHTML = ["']([^"]+)["'](?:\s*\+\s*['"(]+([^"']+))?''').match
|
find_url = match(data, patron=r'innerHTML = ([^;]+)').match
|
||||||
possible_url = find_url[0]
|
possible_url = js2py.eval_js(find_url)
|
||||||
possible_url += find_url[1][2:]
|
|
||||||
|
|
||||||
if not possible_url:
|
|
||||||
possible_url = match(data, patron=r"innerHTML\\'\]=\\'([^']+)").match
|
|
||||||
url = "https:" + possible_url
|
url = "https:" + possible_url
|
||||||
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||||
video_urls.append(['MP4 [Streamtape]', url])
|
video_urls.append(['MP4 [Streamtape]', url])
|
||||||
|
|||||||
Reference in New Issue
Block a user