summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar OndrejIT <git@ondrej.it> 2016-05-19 15:14:46 +0200
committerGravatar OndrejIT <git@ondrej.it> 2016-05-19 15:14:46 +0200
commitd52fce52ca31225c32986b1439f75e548b1c9ade (patch)
tree782a5ea60d53b3c60c7b5374fca1a44271e3b434 /module
parent[DatafileCom] Update (diff)
downloadpyload-d52fce52ca31225c32986b1439f75e548b1c9ade.tar.xz
Improved get_api_password
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/StreamCz.py9
1 files changed, 4 insertions, 5 deletions
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<EP>\d+).+'