This commit is contained in:
@@ -22,4 +22,4 @@
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,4 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
|
||||
def randomize(data):
|
||||
t = string.ascii_letters + string.digits
|
||||
return data + ''.join([random.choice(t) for _ in range(10)])
|
||||
return data + ''.join([random.choice(t) for _ in range(10)])
|
||||
+2
-1
@@ -17,7 +17,8 @@ def test_video_exists(page_url):
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
global data
|
||||
packed = support.match(data, patron=r'(eval\(function\(p.*?)</').match
|
||||
packed = support.match(data, patron=r'<script data-cfasync=\"false\" type=\"text/javascript\">(eval\(function\(p,a,c,k,e,d\).*?)\s*</script>').match
|
||||
|
||||
if packed:
|
||||
data = jsunpack.unpack(packed).replace("\\", "")
|
||||
video_urls = support.get_jwplayer_mediaurl(data, 'filemoon', hls=True)
|
||||
|
||||
+1
-2
@@ -31,9 +31,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
ext = '.mp4'
|
||||
|
||||
global data
|
||||
logger.info(data)
|
||||
|
||||
packed = scrapertools.find_single_match(data, r'(eval.*?)</script>')
|
||||
logger.info(packed)
|
||||
unpacked = jsunpack.unpack(packed)
|
||||
|
||||
# mixdrop like to change var name very often, hoping that will catch every
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "supervideo.tv/embed-([a-z0-9]{12}).html",
|
||||
"pattern": "supervideo\\.[a-z0-9]+?/embed-([a-z0-9]{12}).html",
|
||||
"url": "https://supervideo.cc/e/\\1"
|
||||
},
|
||||
{
|
||||
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://listeamed.net/(?:e|v|d)/([a-zA-Z0-9]+)",
|
||||
"url": "https://listeamed.net/e/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "vidguard",
|
||||
"name": "VidGuard",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@70708",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
# Conector vidguard
|
||||
#
|
||||
# some pieces of code taken from https://github.com/Gujal00/ResolveURL/
|
||||
# --------------------------------------------------------
|
||||
import base64
|
||||
import json
|
||||
import binascii
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.debug("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, config.get_localized_string(70449) % "VidGuard"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.debug("url=" + page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
enc_data = scrapertools.find_single_match(data, r'eval\("window\.ADBLOCKER\s*=\s*false;\\n(.+?);"\);</script')
|
||||
if enc_data:
|
||||
import aadecode
|
||||
enc_data = enc_data.replace('\\u002b', '+')
|
||||
enc_data = enc_data.replace('\\u0027', "'")
|
||||
enc_data = enc_data.replace('\\u0022', '"')
|
||||
enc_data = enc_data.replace('\\/', '/')
|
||||
enc_data = enc_data.replace('\\\\', '\\')
|
||||
enc_data = enc_data.replace('\\"', '"')
|
||||
enc_data = aadecode.decode(enc_data, alt = True)
|
||||
stream_url = json.loads(enc_data[11:]).get('stream')
|
||||
video_urls.append(['VidGuard', sig_decode(stream_url)])
|
||||
|
||||
return video_urls
|
||||
|
||||
def sig_decode(url):
|
||||
sig = url.split('sig=')[1].split('&')[0]
|
||||
t = ''
|
||||
for v in binascii.unhexlify(sig):
|
||||
t += chr((v if isinstance(v, int) else ord(v)) ^ 2)
|
||||
t = list(base64.b64decode(t + '==')[:-5][::-1])
|
||||
|
||||
for i in range(0, len(t) - 1, 2):
|
||||
t[i + 1], t[i] = t[i], t[i + 1]
|
||||
|
||||
url = url.replace(sig, ''.join(chr(x) for x in t)[:-5])
|
||||
logger.debug(url)
|
||||
return url
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:vidhideplus)\\.(?:com)/(?:file)/([0-9a-zA-Z]+)",
|
||||
"url": "https://peytonepre.com/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "vidhide",
|
||||
"name": "VidHide",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@70708",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools, support
|
||||
from lib import jsunpack
|
||||
from platformcode import config, logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.debug("(page_url='%s')" % page_url)
|
||||
global data
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
if '<h1>Page not found</h1>' in data:
|
||||
return False, config.get_localized_string(70449) % "VidHide"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
global data
|
||||
packed = support.match(data, patron=r'(eval\(function\(p,a,c,k,e,d\).*?)\s*</script>').match
|
||||
|
||||
if packed:
|
||||
data = jsunpack.unpack(packed).replace("\\", "")
|
||||
video_urls = support.get_jwplayer_mediaurl(data, 'VidHide', hls=True)
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user