fix userload e wstream
This commit is contained in:
+11
-8
@@ -1,9 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
from lib import aadecode
|
||||
from lib import jsunpack
|
||||
from core import support, httptools
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
global data
|
||||
logger.debug('page url=', page_url)
|
||||
@@ -22,13 +23,15 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
video_urls = []
|
||||
packed = support.match(data, patron=r"(eval\(function\(p,a,c,k,e,d\).*?)\s*<").match
|
||||
unpack = jsunpack.unpack(packed)
|
||||
var = support.match(unpack, patron= r'"([a-zA-Z0-9]{31,32})"').matches[2:]
|
||||
for m in support.match(unpack, patron='var (\w+)="([^"]+)').matches:
|
||||
globals()[m[0]] = m[1]
|
||||
|
||||
if var:
|
||||
post = 'morocco={}&mycountry={}'.format(var[0], var[1])
|
||||
logger.debug(post)
|
||||
url = support.match('https://userload.co/api/request/', post=post, patron=r'([^\s\r\n]+)').match
|
||||
if url:
|
||||
video_urls.append(["{} [Userload]".format(url.split('.')[-1]), url])
|
||||
videojs = httptools.downloadpage('https://userload.co/api/assets/userload/js/videojs.js').data
|
||||
videojs_decoded = aadecode.decode(videojs)
|
||||
post = eval(support.match(videojs_decoded, patron="t.send\(([^\)]+)").match)
|
||||
logger.debug(post)
|
||||
url = support.match('https://userload.co/api/request/', post=post, patron=r'([^\s\r\n]+)').match
|
||||
if url:
|
||||
video_urls.append(["{} [Userload]".format(url.split('.')[-1]), url])
|
||||
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user