aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPSJay <psjay.peng@gmail.com>2015-09-01 11:07:47 +0800
committerSergey M․ <dstftw@gmail.com>2015-09-01 22:25:03 +0600
commitcb3d2eb9e99e1a3f05a5009fc15afc0212a1af1e (patch)
tree4d6d8c60854a98052a6b431961fcd306900d5b24
parent33eae08f0422fb824cea2a4dffc98a347e916169 (diff)
Fix coding styple in YouKuIE.
-rw-r--r--youtube_dl/extractor/youku.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/youtube_dl/extractor/youku.py b/youtube_dl/extractor/youku.py
index 220f84221..6219bc1bb 100644
--- a/youtube_dl/extractor/youku.py
+++ b/youtube_dl/extractor/youku.py
@@ -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 = '%s?password=%s' % (basic_data_url, 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')