diff --git a/oxweb/youtube.py b/oxweb/youtube.py index 6d1aab5..a7c44f4 100644 --- a/oxweb/youtube.py +++ b/oxweb/youtube.py @@ -28,7 +28,10 @@ def getVideoKey(youtubeId): def getVideoUrl(youtubeId, format='mp4'): youtubeKey = getVideoKey(youtubeId) - if format == 'mp4': + if format == '720p': + fmt=22 + url = "http://youtube.com/get_video.php?video_id=%s&t=%s&fmt=%s" % (youtubeId, youtubeKey, fmt) + elif format == 'mp4': fmt=18 url = "http://youtube.com/get_video.php?video_id=%s&t=%s&fmt=%s" % (youtubeId, youtubeKey, fmt) else: @@ -58,6 +61,7 @@ def getInfoFromAtom(entry, video_url_base=None): else: info['flv'] = getVideoUrl(info['id'], 'flv') info['mp4'] = getVideoUrl(info['id'], 'mp4') + info['720p'] = getVideoUrl(info['id'], '720p') info['embed'] = '' % (info['id'], info['id']) return info