]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Check load_more_widget_html for feed paging
authorTim Sogard <src@timsogard.com>
Mon, 28 Jul 2014 00:14:29 +0000 (17:14 -0700)
committerTim Sogard <src@timsogard.com>
Mon, 28 Jul 2014 00:19:26 +0000 (17:19 -0700)
youtube_dl/extractor/youtube.py

index c48d1b8efd38a5bfd7b0c961e6cd827325694719..cd35a16207273c3d6d9ccd81722102f998a0ebc1 100644 (file)
@@ -1325,6 +1325,7 @@ class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor):
                                           u'%s feed' % self._FEED_NAME,
                                           u'Downloading page %s' % i)
             feed_html = info.get('feed_html') or info.get('content_html')
+            load_more_widget_html = info.get('load_more_widget_html') or feed_html
             m_ids = re.finditer(r'"/watch\?v=(.*?)["&]', feed_html)
             ids = orderedSet(m.group(1) for m in m_ids)
             feed_entries.extend(
@@ -1332,7 +1333,7 @@ class YoutubeFeedsInfoExtractor(YoutubeBaseInfoExtractor):
                 for video_id in ids)
             mobj = re.search(
                 r'data-uix-load-more-href="/?[^"]+paging=(?P<paging>\d+)',
-                feed_html)
+                load_more_widget_html)
             if mobj is None:
                 break
             paging = mobj.group('paging')