- video_url = video_data.get('hd_src')
- if not video_url:
- video_url = video_data['sd_src']
- if not video_url:
- raise ExtractorError('Cannot find video URL')
+
+ formats = []
+ for quality in ['sd', 'hd']:
+ src = video_data.get('%s_src' % quality)
+ if src is not None:
+ formats.append({
+ 'format_id': quality,
+ 'url': src,
+ })
+ if not formats:
+ raise ExtractorError('Cannot find video formats')