KoD 1.6.1
-Migliorata l'efficacia del riconoscimento dei contenuti in ricerca film/serie - corretti alcuni bug e fatti alcuni fix per i soliti cambi di struttura
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "ninjastream.to/(?:watch/)?([0-9a-zA-Z]+)",
|
||||
"pattern": "ninjastream\\.to/(?:watch|download)/([0-9a-zA-Z]+)",
|
||||
"url": "https://ninjastream.to/watch/\\1"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -20,11 +20,17 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
logger.debug("URL", page_url)
|
||||
video_urls = []
|
||||
|
||||
h = json.loads(support.match(data, patron='stream="([^"]+)"').match.replace('"','"').replace('\\',''))
|
||||
baseurl = h['host'] + h['hash']
|
||||
h = json.loads(support.match(data, patron='stream="([^"]+)"').match.replace('"','"'))
|
||||
baseurl = decode(h['host']) + h['hash']
|
||||
matches = support.match(baseurl + '/index.m3u8', patron=r'RESOLUTION=\d+x(\d+)\s*([^\s]+)').matches
|
||||
|
||||
for quality, url in matches:
|
||||
video_urls.append(["{} {}p [NinjaStream]".format(url.split('.')[-1], quality), '{}/{}'.format(baseurl, url)])
|
||||
|
||||
return video_urls
|
||||
return video_urls
|
||||
|
||||
def decode(host):
|
||||
Host = ''
|
||||
for n in range(len(host)):
|
||||
Host += chr(ord(host[n]) ^ ord('2'))
|
||||
return Host
|
||||
@@ -12,10 +12,10 @@ def test_video_exists(page_url):
|
||||
logger.debug("(page_url='%s')" % page_url)
|
||||
global data
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
if 'Video embed restricted for this domain'in data:
|
||||
headers = {'Referer':''}
|
||||
if 'Video embed restricted for this domain' in data:
|
||||
headers = {'Referer': ''}
|
||||
data = httptools.downloadpage(page_url, headers=headers, cookies=False).data
|
||||
if 'File is no longer available as it expired or has been deleted' in data:
|
||||
if 'File is no longer available as it expired or has been deleted' in data or 'fake-' in data:
|
||||
return False, config.get_localized_string(70449) % "SuperVideo"
|
||||
|
||||
return True, ""
|
||||
|
||||
@@ -18,5 +18,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
logger.debug("url=" + page_url)
|
||||
global data
|
||||
video_urls = support.get_jwplayer_mediaurl(data, 'Vidmoly')
|
||||
for url in video_urls:
|
||||
logger.debug(url)
|
||||
url[-1] = url[-1].replace(',','').replace('.urlset','').replace('/hls','')
|
||||
|
||||
return video_urls
|
||||
|
||||
Reference in New Issue
Block a user