KoD 1.5.3
- correzioni di alcuni bug (citiamo ad esempio il crash con il refresh rate e l'impossibilita di entrare nel menu server bloccati) - fix per cambio di struttura a qualche canale/server - migliorie interne
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "speedvideo.net/(?:embed-|)(?!i/)([A-Z0-9a-z]+)",
|
||||
"url": "http://speedvideo.net/embed-\\1.html"
|
||||
"url": "https://speedvideo.net/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://streamingcommunity.net/[^/]+/([A-Za-z0-9]+)",
|
||||
"url": "https://streamingcommunity.net/watch/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id":"streamingcommunity_server",
|
||||
"name": "StreamingCommunity",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@70708",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import requests, sys
|
||||
from core import httptools, support
|
||||
from platformcode import config, logger
|
||||
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14',
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'Referer': 'https://streamingcommunity.net'}
|
||||
|
||||
def test_video_exists(page_url):
|
||||
global data
|
||||
logger.debug('page url=', page_url)
|
||||
response = httptools.downloadpage(page_url, headers=headers)
|
||||
|
||||
if response.code == 404:
|
||||
return False, config.get_localized_string(70449) % 'StreamingCommunity'
|
||||
else:
|
||||
data = response.data
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.debug("url=" + page_url)
|
||||
video_urls = []
|
||||
url = support.match(data.replace('"','"').replace('\\',''), patron=r'video_url"\s*:\s*"([^"]+)"').match
|
||||
def videourls(res):
|
||||
newurl = '{}/{}'.format(url, res)
|
||||
if requests.head(newurl, headers=headers).status_code == 200:
|
||||
video_urls.append(["m3u8 {} [StreamingCommunity]".format(res), newurl])
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
for res in ['480p', '720p', '1080p']:
|
||||
executor.submit(videourls, res)
|
||||
if not video_urls: video_urls = [["m3u8 [StreamingCommunity]", url]]
|
||||
else: video_urls.sort(key=lambda url: int(support.match(url[0], patron=r'(\d+)p').match))
|
||||
return video_urls
|
||||
+7
-2
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
from lib import jsunpack
|
||||
from core import support, httptools
|
||||
from platformcode import logger, config
|
||||
|
||||
@@ -19,9 +20,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
global data
|
||||
logger.debug("URL", page_url)
|
||||
video_urls = []
|
||||
var = support.match(data, patron=r"var\|\|([^']+)").match.split('|')
|
||||
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'baffffbd="([^"]+)".*?edecbade="([^"]+)').match
|
||||
|
||||
if var:
|
||||
post = 'morocco={}&mycountry={}'.format(var[7], var[17])
|
||||
post = 'morocco={}&mycountry={}'.format(var[1], var[0])
|
||||
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])
|
||||
|
||||
Reference in New Issue
Block a user