Fix dailymotion "search" return bug message

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

Signed-off-by: Vincent Texier <vit@free.fr>
This commit is contained in:
Vincent Texier 2014-11-18 20:47:19 +01:00 committed by Florent
commit aea0b6a6b7

View file

@ -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: