瀏覽代碼

[motorsport] Fix on Python 3

Philipp Hagemeister 11 年之前
父節點
當前提交
7d1b527ff9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/extractor/motorsport.py

+ 1 - 1
youtube_dl/extractor/motorsport.py

@@ -44,7 +44,7 @@ class MotorsportIE(InfoExtractor):
         e = compat_str(int(time.time()) + 24 * 60 * 60)
         e = compat_str(int(time.time()) + 24 * 60 * 60)
         base_video_url = params['location'] + '?e=' + e
         base_video_url = params['location'] + '?e=' + e
         s = 'h3hg713fh32'
         s = 'h3hg713fh32'
-        h = hashlib.md5(s + base_video_url).hexdigest()
+        h = hashlib.md5((s + base_video_url).encode('utf-8')).hexdigest()
         video_url = base_video_url + '&h=' + h
         video_url = base_video_url + '&h=' + h
 
 
         uploader = self._html_search_regex(
         uploader = self._html_search_regex(