aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-01-02 21:46:40 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-01-02 21:46:40 +0800
commitb7546397f080e65fed42c69701f423e4f57f43f5 (patch)
tree8d476643dbadb40309557fff6b027d4477a167a7 /youtube_dl/extractor
parent03116772583103ba97eaf8ce2cbabba9742e1929 (diff)
[baidu] Use list comprehension
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/baidu.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/baidu.py b/youtube_dl/extractor/baidu.py
index d35116a7c..76b21e596 100644
--- a/youtube_dl/extractor/baidu.py
+++ b/youtube_dl/extractor/baidu.py
@@ -48,10 +48,9 @@ class BaiduVideoIE(InfoExtractor):
episodes_detail = self._call_api(
'xqsingle', category, playlist_id, 'Download episodes JSON metadata')
- entries = []
- for episode in episodes_detail['videos']:
- entries.append(self.url_result(
- episode['url'], video_title=episode['title']))
+ entries = [self.url_result(
+ episode['url'], video_title=episode['title']
+ ) for episode in episodes_detail['videos']]
return self.playlist_result(
entries, playlist_id, playlist_title, playlist_description)