Merge remote-tracking branch 'origin/master'
This commit is contained in:
+7
-3
@@ -36,14 +36,20 @@ 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.info(" url=" + page_url)
|
logger.info(" url=" + page_url)
|
||||||
video_urls = []
|
video_urls = []
|
||||||
|
# dbg()
|
||||||
|
|
||||||
global data
|
global data
|
||||||
|
logger.info('PAGE DATA' + data)
|
||||||
vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)')
|
vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)')
|
||||||
|
if not vres: vres = scrapertools.find_multiple_matches(data, '<td>(\d+x\d+)')
|
||||||
|
|
||||||
data_pack = scrapertools.find_single_match(data, "</div>\n\s*<script[^>]+>(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
data_pack = scrapertools.find_single_match(data, "</div>\n\s*<script[^>]+>(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||||
if data_pack != "":
|
if data_pack != "":
|
||||||
from lib import jsunpack
|
from lib import jsunpack
|
||||||
data = jsunpack.unpack(data_pack)
|
data = jsunpack.unpack(data_pack)
|
||||||
|
|
||||||
|
block = scrapertools.find_single_match(data, "sources:\s\[([^\]]+)\]")
|
||||||
|
data = block if block else data
|
||||||
# URL
|
# URL
|
||||||
# logger.info(data)
|
# logger.info(data)
|
||||||
matches = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)')
|
matches = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)')
|
||||||
@@ -56,6 +62,4 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
video_urls.append([vres[i] + " mp4 [Akvideo] ", media_url.replace('https://', 'http://') + '|' + _headers])
|
video_urls.append([vres[i] + " mp4 [Akvideo] ", media_url.replace('https://', 'http://') + '|' + _headers])
|
||||||
i = i + 1
|
i = i + 1
|
||||||
|
|
||||||
for video_url in video_urls:
|
return sorted(video_urls, key=lambda x: int(x[0].split('x')[0]))
|
||||||
logger.info(" %s - %s" % (video_url[0], video_url[1]))
|
|
||||||
return sorted(video_urls, key=lambda x: x[0].split('x')[1])
|
|
||||||
|
|||||||
Reference in New Issue
Block a user