diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-09-23 19:13:11 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-09-23 19:13:11 +0700 |
commit | f7d159cf953bd1884ca45f535327f3016998270c (patch) | |
tree | bc5e08ba15291f056ae449f0213a9d457671b578 | |
parent | 632e5684ce797eb8a7372eb25dd4ce299f2e66de (diff) |
[noco] Encode before passing to hashlib.md5 (Closes #3816)
-rw-r--r-- | youtube_dl/extractor/noco.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/noco.py b/youtube_dl/extractor/noco.py index e3ec9ed15..7f1bc6377 100644 --- 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) |