X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fyouku.py;h=2e81d92238307e8914769d6fc48d03befd6af2bf;hb=0c59d02bdc86056957fcbebfec591ad53b7fcda3;hp=220f84221817b7da9925273fb90620d300d8f17f;hpb=33eae08f0422fb824cea2a4dffc98a347e916169;p=youtube-dl diff --git a/youtube_dl/extractor/youku.py b/youtube_dl/extractor/youku.py index 220f84221..2e81d9223 100644 --- a/youtube_dl/extractor/youku.py +++ b/youtube_dl/extractor/youku.py @@ -54,9 +54,9 @@ class YoukuIE(InfoExtractor): 'note': 'Video protected with password', 'info_dict': { 'id': 'XNjA1NzA2Njgw', - 'ext': 'flv', - 'title': u'邢義田复旦讲座之想象中的胡人—从“左衽孔子”说起', + 'title': '邢義田复旦讲座之想象中的胡人—从“左衽孔子”说起', }, + 'playlist_count': 19, 'params': { 'videopassword': '100600', }, @@ -199,14 +199,13 @@ class YoukuIE(InfoExtractor): video_password = self._downloader.params.get('videopassword', None) # request basic data + basic_data_url = 'http://v.youku.com/player/getPlayList/VideoIDS/%s' % video_id if video_password: - data1 = retrieve_data( - 'http://v.youku.com/player/getPlayList/VideoIDS/%s?password=%s' % (video_id, video_password), - 'Downloading JSON metadata 1') - else: - data1 = retrieve_data( - 'http://v.youku.com/player/getPlayList/VideoIDS/%s' % video_id, - 'Downloading JSON metadata 1') + basic_data_url += '?password=%s' % video_password + + data1 = retrieve_data( + basic_data_url, + 'Downloading JSON metadata 1') data2 = retrieve_data( 'http://v.youku.com/player/getPlayList/VideoIDS/%s/Pf/4/ctype/12/ev/1' % video_id, 'Downloading JSON metadata 2')