projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
632e568
)
[noco] Encode before passing to hashlib.md5 (Closes #3816)
author
Sergey M․
<dstftw@gmail.com>
Tue, 23 Sep 2014 12:13:11 +0000
(19:13 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 23 Sep 2014 12:13:11 +0000
(19:13 +0700)
youtube_dl/extractor/noco.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/noco.py
b/youtube_dl/extractor/noco.py
index e3ec9ed15505452e8be2bb218d45a321dc554e30..7f1bc6377a42e99d853a38dd406a60dda929e49f 100644
(file)
--- a/
youtube_dl/extractor/noco.py
+++ b/
youtube_dl/extractor/noco.py
@@
-62,7
+62,7
@@
class NocoIE(InfoExtractor):
def _call_api(self, path, video_id, note):
ts = compat_str(int(time.time() * 1000))
- tk = hashlib.md5(
hashlib.md5(ts).hexdigest() + '#8S?uCraTedap6a'
).hexdigest()
+ tk = hashlib.md5(
(hashlib.md5(ts.encode('ascii')).hexdigest() + '#8S?uCraTedap6a').encode('ascii')
).hexdigest()
url = self._API_URL_TEMPLATE % (path, ts, tk)
resp = self._download_json(url, video_id, note)