about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-04 14:07:29 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-04 14:07:29 +0200
commitc3fef636b55f30f58a1bd9c0c2a80e20365eee7a (patch)
treec77a3230d474f5a6919fd84e89d36d8871ef519d
parent46e28a84caae4820c7352232b048ecb3cbcd4012 (diff)
downloadyoutube-dl-c3fef636b55f30f58a1bd9c0c2a80e20365eee7a.tar.gz
youtube-dl-c3fef636b55f30f58a1bd9c0c2a80e20365eee7a.tar.xz
youtube-dl-c3fef636b55f30f58a1bd9c0c2a80e20365eee7a.zip
[dailymotion] Fix playlist extraction
The html code has changed, make the video ids extraction more solid.
-rw-r--r--youtube_dl/extractor/dailymotion.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/dailymotion.py b/youtube_dl/extractor/dailymotion.py
index 259806f38..7d8353946 100644
--- a/youtube_dl/extractor/dailymotion.py
+++ b/youtube_dl/extractor/dailymotion.py
@@ -10,6 +10,7 @@ from ..utils import (
     compat_str,
     get_element_by_attribute,
     get_element_by_id,
+    orderedSet,
 
     ExtractorError,
 )
@@ -158,12 +159,12 @@ class DailymotionPlaylistIE(DailymotionBaseInfoExtractor):
                                              id, u'Downloading page %s' % pagenum)
 
             playlist_el = get_element_by_attribute(u'class', u'video_list', webpage)
-            video_ids.extend(re.findall(r'data-id="(.+?)" data-ext-id', playlist_el))
+            video_ids.extend(re.findall(r'data-id="(.+?)"', playlist_el))
 
             if re.search(self._MORE_PAGES_INDICATOR, webpage, re.DOTALL) is None:
                 break
         return [self.url_result('http://www.dailymotion.com/video/%s' % video_id, 'Dailymotion')
-                   for video_id in video_ids]
+                   for video_id in orderedSet(video_ids)]
 
     def _real_extract(self, url):
         mobj = re.match(self._VALID_URL, url)