- video_title = self._html_search_regex(
- r'<title>(.*?)\s+-\s+XVID', webpage, 'title')
- video_thumbnail = self._search_regex(
- r'url_bigthumb=(.+?)&', webpage, 'thumbnail', fatal=False)
- video_duration = int_or_none(self._og_search_property(
+ title = self._html_search_regex(
+ (r'<title>(?P<title>.+?)\s+-\s+XVID',
+ r'setVideoTitle\s*\(\s*(["\'])(?P<title>(?:(?!\1).)+)\1'),
+ webpage, 'title', default=None,
+ group='title') or self._og_search_title(webpage)
+
+ thumbnails = []
+ for preference, thumbnail in enumerate(('', '169')):
+ thumbnail_url = self._search_regex(
+ r'setThumbUrl%s\(\s*(["\'])(?P<thumbnail>(?:(?!\1).)+)\1' % thumbnail,
+ webpage, 'thumbnail', default=None, group='thumbnail')
+ if thumbnail_url:
+ thumbnails.append({
+ 'url': thumbnail_url,
+ 'preference': preference,
+ })
+
+ duration = int_or_none(self._og_search_property(