This commit is contained in:
Alhaziel01
2020-11-26 18:23:13 +01:00
parent 22f4e80783
commit a91d98185f
2 changed files with 12 additions and 15 deletions
+3 -6
View File
@@ -21,15 +21,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# from core.support import dbg;dbg()
global data
logger.debug("URL", page_url)
# from core.support import dbg;dbg()
video_urls = []
host = scrapertools.find_single_match(page_url, r'http[s]?://[^/]+')
new_url = scrapertools.find_single_match(data, r'<iframe src="([^"]+)"')
if new_url:
host = scrapertools.find_single_match(new_url, r'http[s]?://[^/]+')
data = httptools.downloadpage(host + new_url).data
else:
host = scrapertools.find_single_match(page_url, r'http[s]?://[^/]+')
if new_url: data = httptools.downloadpage(host + new_url).data
label = scrapertools.find_single_match(data, r'type:\s*"video/([^"]+)"')