From 64c44851510ebecbf23e904df994581a1f7dfca0 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Fri, 17 Aug 2018 05:58:35 +0300 Subject: [PATCH 1/2] [webofstories] fix playlist downloads --- youtube_dl/extractor/webofstories.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/webofstories.py b/youtube_dl/extractor/webofstories.py index 1eb1f6702..73728db76 100644 --- a/youtube_dl/extractor/webofstories.py +++ b/youtube_dl/extractor/webofstories.py @@ -133,8 +133,8 @@ class WebOfStoriesPlaylistIE(InfoExtractor): webpage = self._download_webpage(url, playlist_id) entries = [ - self.url_result('http://www.webofstories.com/play/%s' % video_number, 'WebOfStories') - for video_number in set(re.findall(r'href="/playAll/%s\?sId=(\d+)"' % playlist_id, webpage)) + self.url_result('http://www.webofstories.com/play/%s/%d' % (playlist_id, video_number), 'WebOfStories') + for video_number in range(1, len(re.findall(r'class="playListItem\s+"', webpage)) + 2) ] title = self._search_regex( From 50a0d47bf6e4befc6f4149eb529ea08d9a421f88 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 25 Aug 2018 11:54:27 +0300 Subject: [PATCH 2/2] [webofstories] capture playlist members by id attribute --- youtube_dl/extractor/webofstories.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/webofstories.py b/youtube_dl/extractor/webofstories.py index 73728db76..145af2e2f 100644 --- a/youtube_dl/extractor/webofstories.py +++ b/youtube_dl/extractor/webofstories.py @@ -133,10 +133,10 @@ class WebOfStoriesPlaylistIE(InfoExtractor): webpage = self._download_webpage(url, playlist_id) entries = [ - self.url_result('http://www.webofstories.com/play/%s/%d' % (playlist_id, video_number), 'WebOfStories') - for video_number in range(1, len(re.findall(r'class="playListItem\s+"', webpage)) + 2) + self.url_result('http://www.webofstories.com/play/%s/%s' % (playlist_id, video_number), 'WebOfStories') + for video_number in range(1, len(re.findall(r'id="(\d+)"', webpage)) + 1) ] - + print(entries[0]) title = self._search_regex( r'
\s*([^<]+)', webpage, 'speaker', default=None)