fix userload e wstream

This commit is contained in:
mac12m99
2021-03-24 20:24:49 +01:00
parent a79a83ba7f
commit 953e25b3c0
4 changed files with 16 additions and 16 deletions

View File

@@ -6,14 +6,9 @@
from core import support
host = support.config.get_channel_url()
IDIOMAS = {'Italiano': 'IT'}
list_language = IDIOMAS.values()
headers = {'Referer': host}
@support.menu
def mainlist(item):

View File

@@ -5,6 +5,7 @@ from core import scrapertools
from lib import jsunpack
from platformcode import logger, config
def test_video_exists(page_url):
logger.debug("(page_url='%s')" % page_url)
global data
@@ -15,8 +16,9 @@ def test_video_exists(page_url):
def get_video_url(page_url, user="", password="", video_password=""):
logger.debug("(page_url='%s')" % page_url)
logger.info("(page_url='%s')" % page_url)
video_urls = []
multires = False
try:
packed = scrapertools.find_single_match(data, "text/javascript'>(eval.*?)\s*</script>")

View File

@@ -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

View File

@@ -11,7 +11,7 @@
"url": "http://wstream.video/video.php?file_code=\\1"
},
{
"pattern": "(?:wstream\\.video|wstream\\.icu|krask\\.xyz)/((?:api/vcmod/fastredirect/streaming\\.php\\?id=|swembedid|swvideoid/)[$0-9]+)",
"pattern": "(?:wstream\\.video|wstream\\.icu|krask\\.xyz)/((?:api/vcmod/fastredirect/[a-z]+\\.php\\?id=|swembedid|swvideoid/)[$0-9]+)",
"url": "http://wstream.video/\\1"
},
{