fix userload e wstream
This commit is contained in:
@@ -6,14 +6,9 @@
|
|||||||
from core import support
|
from core import support
|
||||||
|
|
||||||
host = support.config.get_channel_url()
|
host = support.config.get_channel_url()
|
||||||
|
|
||||||
IDIOMAS = {'Italiano': 'IT'}
|
|
||||||
list_language = IDIOMAS.values()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
headers = {'Referer': host}
|
headers = {'Referer': host}
|
||||||
|
|
||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from core import scrapertools
|
|||||||
from lib import jsunpack
|
from lib import jsunpack
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.debug("(page_url='%s')" % page_url)
|
logger.debug("(page_url='%s')" % page_url)
|
||||||
global data
|
global data
|
||||||
@@ -15,8 +16,9 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
|
|
||||||
def get_video_url(page_url, user="", password="", video_password=""):
|
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 = []
|
video_urls = []
|
||||||
|
multires = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
packed = scrapertools.find_single_match(data, "text/javascript'>(eval.*?)\s*</script>")
|
packed = scrapertools.find_single_match(data, "text/javascript'>(eval.*?)\s*</script>")
|
||||||
|
|||||||
+7
-4
@@ -1,9 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import json
|
from lib import aadecode
|
||||||
from lib import jsunpack
|
from lib import jsunpack
|
||||||
from core import support, httptools
|
from core import support, httptools
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
global data
|
global data
|
||||||
logger.debug('page url=', page_url)
|
logger.debug('page url=', page_url)
|
||||||
@@ -22,10 +23,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
video_urls = []
|
video_urls = []
|
||||||
packed = support.match(data, patron=r"(eval\(function\(p,a,c,k,e,d\).*?)\s*<").match
|
packed = support.match(data, patron=r"(eval\(function\(p,a,c,k,e,d\).*?)\s*<").match
|
||||||
unpack = jsunpack.unpack(packed)
|
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:
|
videojs = httptools.downloadpage('https://userload.co/api/assets/userload/js/videojs.js').data
|
||||||
post = 'morocco={}&mycountry={}'.format(var[0], var[1])
|
videojs_decoded = aadecode.decode(videojs)
|
||||||
|
post = eval(support.match(videojs_decoded, patron="t.send\(([^\)]+)").match)
|
||||||
logger.debug(post)
|
logger.debug(post)
|
||||||
url = support.match('https://userload.co/api/request/', post=post, patron=r'([^\s\r\n]+)').match
|
url = support.match('https://userload.co/api/request/', post=post, patron=r'([^\s\r\n]+)').match
|
||||||
if url:
|
if url:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"url": "http://wstream.video/video.php?file_code=\\1"
|
"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"
|
"url": "http://wstream.video/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user