Fix Streamtape
This commit is contained in:
@@ -2,9 +2,8 @@
|
|||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Conector streamtape By Alfa development Group
|
# Conector streamtape By Alfa development Group
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
from core import httptools
|
from core import httptools, scrapertools
|
||||||
from core import scrapertools
|
from platformcode import logger, config
|
||||||
from platformcode import logger
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
PY3 = False
|
PY3 = False
|
||||||
@@ -20,7 +19,7 @@ def test_video_exists(page_url):
|
|||||||
data = httptools.downloadpage(page_url, headers=referer).data
|
data = httptools.downloadpage(page_url, headers=referer).data
|
||||||
|
|
||||||
if "Video not found" in data:
|
if "Video not found" in data:
|
||||||
return False, "[streamtape] El archivo no existe o ha sido borrado"
|
return False, config.get_localized_string(70449) % 'Streamtape'
|
||||||
|
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
@@ -29,7 +28,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
logger.info("url=" + page_url)
|
logger.info("url=" + page_url)
|
||||||
|
|
||||||
video_urls = []
|
video_urls = []
|
||||||
url = "https:" + scrapertools.find_single_match(data, 'innerHTML = "([^"]+)')
|
possible_url = scrapertools.find_single_match(data, 'innerHTML = "([^"]+)')
|
||||||
|
if not '\\' in possible_url:
|
||||||
|
possible_url = scrapertools.find_single_match(data, "innerHTML\\'\]=\\'([^']+)")
|
||||||
|
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])
|
||||||
return video_urls
|
return video_urls
|
||||||
Reference in New Issue
Block a user