From b8e189f1decc620695bb8831ccc79382d8154c0a Mon Sep 17 00:00:00 2001 From: "M.Yasoob Khalid" Date: Thu, 6 Jun 2013 00:51:27 +0500 Subject: [PATCH] added the decoding of the response (for python 3) --- youtube_dl/InfoExtractors.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 2e8d0df9f..b6711a6e0 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -4500,11 +4500,13 @@ class HypemIE(InfoExtractor): response = compat_urllib_request.urlopen(request) #save our cookie cookie = response.headers.get('Set-Cookie') + encoding = response.headers.get('Content-Type') + encoding = (encoding.split(';')[1]).split('=')[1] #grab the HTML - html = response.read() + html = response.read().decode(encoding) response.close() track_list = [] - list_data = re.search(b'',html) + list_data = re.search(r'',html) html_tracks = list_data.group(1) if html_tracks is None: tracks = track_list