From: Yen Chi Hsuan Date: Sat, 2 Jan 2016 13:46:40 +0000 (+0800) Subject: [baidu] Use list comprehension X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=b7546397f080e65fed42c69701f423e4f57f43f5;p=youtube-dl.git [baidu] Use list comprehension --- 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)