Fix Mixdrop e gounlimited

This commit is contained in:
Alhaziel
2019-12-19 12:37:22 +01:00
parent 810f729bc4
commit 3463ededcb
2 changed files with 6 additions and 5 deletions

View File

@@ -14,20 +14,21 @@ from platformcode import logger
def test_video_exists(page_url):
data = httptools.downloadpage(page_url).data
if data == "File was deleted":
return False, "[gounlimited] El video ha sido borrado"
return False, config.get_localized_string(70449) % "Go Unlimited"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url=" + page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
data = httptools.downloadpage(page_url, use_requests=True, verify=False).data
data = re.sub(r'"|\n|\r|\t|&nbsp;|<br>|\s{2,}', "", data)
logger.info('GOUN DATA= '+data)
packed_data = scrapertools.find_single_match(data, "javascript'>(eval.*?)</script>")
unpacked = jsunpack.unpack(packed_data)
patron = "sources..([^\]]+)"
patron = r"sources..([^\]]+)"
matches = re.compile(patron, re.DOTALL).findall(unpacked)
for url in matches:
url += "|Referer=%s" %page_url
video_urls.append(['mp4', url])
video_urls.append(['mp4 [Go Unlimited]', url])
return video_urls

View File

@@ -26,7 +26,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = re.sub(r'>\s\s*<', '><', data)
jsCode = scrapertoolsV2.find_single_match(data, r'<script>\s*MDCore\.ref = "[a-z0-9]+"; (.*?) </script>')
jsUnpacked = jsunpack.unpack(jsCode)
url = "https://" + scrapertoolsV2.find_single_match(jsUnpacked, r'MDCore\.vsr(?:c)?="//([^"]+)')
url = "https://" + scrapertoolsV2.find_single_match(jsUnpacked, r'vsr[^=]*="(?:/)?(/[^"]+)')
itemlist.append([".mp4 [MixDrop]", url])