From d52fce52ca31225c32986b1439f75e548b1c9ade Mon Sep 17 00:00:00 2001 From: OndrejIT Date: Thu, 19 May 2016 15:14:46 +0200 Subject: Improved get_api_password --- module/plugins/hoster/StreamCz.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py index fc00c0776..3ac96dc36 100644 --- a/module/plugins/hoster/StreamCz.py +++ b/module/plugins/hoster/StreamCz.py @@ -12,11 +12,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster def get_api_password(episode): api_key = "fb5f58a820353bd7095de526253c14fd" - timestamp = int(round(time.time() * 1000 / 1e3 / 24 / 3600)) - api_pass = api_key + "/episode/" + episode + str(timestamp) + timestamp = int(round(time.time() / 24 / 3600)) + api_pass = "{0}/episode/{1}{2}".format(api_key, episode, timestamp) - m = hashlib.md5() - m.update(api_pass) + m = hashlib.md5(api_pass) return m.hexdigest() @@ -53,7 +52,7 @@ def get_link_quality(videos, quality): class StreamCz(SimpleHoster): __name__ = "StreamCz" __type__ = "hoster" - __version__ = "0.37" + __version__ = "0.38" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/(?P\d+).+' -- cgit v1.2.3