[weboob] [PATCH 3/3] Fix dailymotion "search" return bug message

Vincent Texier vit at free.fr
Tue Nov 18 20:47:19 CET 2014


Bug(dailymotion): Not enough elements found (1 expected) with selector "div.sd_video_previewtwig"

Signed-off-by: Vincent Texier <vit at free.fr>
---
 modules/dailymotion/pages.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/dailymotion/pages.py b/modules/dailymotion/pages.py
index af29430..771cdd2 100644
--- a/modules/dailymotion/pages.py
+++ b/modules/dailymotion/pages.py
@@ -36,7 +36,7 @@ from .video import DailymotionVideo
 class IndexPage(Page):
     def iter_videos(self):
         for div in self.parser.select(self.document.getroot(), 'div.sd_video_listitem'):
-            smalldiv = self.parser.select(div, 'div.sd_video_previewtwig', 1)
+            smalldiv = self.parser.select(div, 'div.sd_video_preview', 1)
             _id = smalldiv.attrib.get('data-id', None)
 
             if _id is None:
-- 
1.9.1




More information about the weboob mailing list