]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Simplify
authorSergey M․ <dstftw@gmail.com>
Mon, 13 Apr 2015 14:28:16 +0000 (20:28 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 13 Apr 2015 14:28:16 +0000 (20:28 +0600)
youtube_dl/extractor/youtube.py

index dc9e15e98d655e9e53c294035f467569cd307283..52909b0daa945170e2d3ebec6892b9f906f3087e 100644 (file)
@@ -1397,20 +1397,18 @@ class YoutubeChannelIE(InfoExtractor):
         if autogenerated:
             # The videos are contained in a single page
             # the ajax pages can't be used, they are empty
-            videos = self.extract_videos_from_page(channel_page)
             entries = [
                 self.url_result(
                     video_id, 'Youtube', video_id=video_id,
                     video_title=video_title)
-                for video_id, video_title in videos]
+                for video_id, video_title in self.extract_videos_from_page(channel_page)]
             return self.playlist_result(entries, channel_id)
 
         def _entries():
             more_widget_html = content_html = channel_page
             for pagenum in itertools.count(1):
 
-                ids_in_page = self.extract_videos_from_page(content_html)
-                for video_id, video_title in ids_in_page:
+                for video_id, video_title in self.extract_videos_from_page(content_html):
                     yield self.url_result(
                         video_id, 'Youtube', video_id=video_id,
                         video_title=video_title)