Fix AU
This commit is contained in:
@@ -195,6 +195,7 @@ def episodios(item):
|
|||||||
support.info()
|
support.info()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
title = 'Parte ' if item.type.lower() == 'movie' else 'Episodio '
|
title = 'Parte ' if item.type.lower() == 'movie' else 'Episodio '
|
||||||
|
|
||||||
for it in item.episodes:
|
for it in item.episodes:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
item.clone(title=support.typo(title + it['number'], 'bold'),
|
item.clone(title=support.typo(title + it['number'], 'bold'),
|
||||||
@@ -218,6 +219,6 @@ def episodios(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
itemlist = [item.clone(title=support.config.get_localized_string(30137), server='streamingcommunityws')]
|
itemlist = [item.clone(title=support.config.get_localized_string(30137), server='streamingcommunityws', url=str(item.scws_id))]
|
||||||
return support.server(item, itemlist=itemlist, referer=False)
|
return support.server(item, itemlist=itemlist, referer=False)
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ from platformcode import logger, config
|
|||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
global scws_id
|
global scws_id
|
||||||
logger.debug('page url=', page_url)
|
logger.debug('page url=', page_url)
|
||||||
# support.dbg()
|
|
||||||
|
|
||||||
scws_id = support.match(page_url, patron=r'scws_id[^:]+:(\d+)').match
|
if page_url.isdigit():
|
||||||
|
scws_id = page_url
|
||||||
|
else:
|
||||||
|
scws_id = support.match(page_url, patron=r'scws_id[^:]+:(\d+)').match
|
||||||
|
|
||||||
if not scws_id:
|
if not scws_id:
|
||||||
return False, config.get_localized_string(70449) % 'StreamingCommunityWS'
|
return False, config.get_localized_string(70449) % 'StreamingCommunityWS'
|
||||||
@@ -27,8 +29,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
clientIp = httptools.downloadpage('http://ip-api.com/json/').json.get('query')
|
clientIp = httptools.downloadpage('http://ip-api.com/json/').json.get('query')
|
||||||
if clientIp:
|
if clientIp:
|
||||||
expires = int(time() + 172800)
|
expires = int(time() + 172800)
|
||||||
token = b64encode(md5(f'{expires}{clientIp} Yc8U6r8KjAKAepEA'.encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, clientIp).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')
|
||||||
url = f'https://scws.work/master/{scws_id}?token={token}&expires={expires}&n=1'
|
url = 'https://scws.work/master/{}?token={}&expires={}&n=1'.format(scws_id, token, expires)
|
||||||
video_urls.append(['hls', url])
|
video_urls.append(['hls', url])
|
||||||
|
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|||||||
Reference in New Issue
Block a user