From b7546397f080e65fed42c69701f423e4f57f43f5 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sat, 2 Jan 2016 21:46:40 +0800 Subject: [PATCH] [baidu] Use list comprehension --- youtube_dl/extractor/baidu.py | 7 +++---- 1 file 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) -- 2.40.0