]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[webofstories:playlist] Fix extraction (closes #16914)
authorSergey M․ <dstftw@gmail.com>
Sun, 26 Aug 2018 14:41:55 +0000 (21:41 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 26 Aug 2018 14:42:30 +0000 (21:42 +0700)
youtube_dl/extractor/webofstories.py

index 1eb1f67024acfca7948d7450f2bca849069190cc..f2b8d19b439d4279e89b872e41b2eeefd421333e 100644 (file)
@@ -4,7 +4,10 @@ from __future__ import unicode_literals
 import re
 
 from .common import InfoExtractor
-from ..utils import int_or_none
+from ..utils import (
+    int_or_none,
+    orderedSet,
+)
 
 
 class WebOfStoriesIE(InfoExtractor):
@@ -133,8 +136,10 @@ 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' % video_id,
+                'WebOfStories', video_id=video_id)
+            for video_id in orderedSet(re.findall(r'\bid=["\']td_(\d+)', webpage))
         ]
 
         title = self._search_regex(