1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-21 20:02:55 +08:00

[noco] Encode before passing to hashlib.md5 (Closes #3816)

This commit is contained in:
Sergey M․ 2014-09-23 19:13:11 +07:00
parent 632e5684ce
commit f7d159cf95

View File

@ -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)