diff --git a/ox/web/youtube.py b/ox/web/youtube.py index 2e65c0f..6a0ac3f 100644 --- a/ox/web/youtube.py +++ b/ox/web/youtube.py @@ -46,14 +46,14 @@ def video_url(youtubeId, format='mp4', timeout=cache_timeout): def get_video_info(id): eurl = get_url(id) - data = read_url(eurl) + data = read_url(eurl).decode('utf-8') t = re.compile('\W[\'"]?t[\'"]?: ?[\'"](.+?)[\'"]').findall(data) if t: t = t[0] else: raise IOError url = "http://www.youtube.com/get_video_info?&video_id=%s&el=$el&ps=default&eurl=%s&hl=en_US&t=%s" % (id, quote(eurl), quote(t)) - data = read_url(url) + data = read_url(url).decode('utf-8') info = {} for part in data.split('&'): key, value = part.split('=')