- video_url = self._search_regex(r"var normal_video_file = '(.*?)';",
- webpage, u'video file URL')
+ formats = []
+ for format_id in ('normal', 'hq'):
+ rex = r"var %s_video_file = '(.*?)';" % re.escape(format_id)
+ video_url = self._search_regex(rex, webpage, u'video file URLx',
+ fatal=False)
+ if not video_url:
+ continue
+ formats.append({
+ 'format_id': format_id,
+ 'url': video_url,
+ })
+ if not formats:
+ raise ExtractorError(u'Cannot find any video format!')