- r'(?s)source["\']?\s*:\s*({.+?})\s*[,}]', webpage, 'source',
- default='{}'),
- video_id, transform_source=js_to_json, fatal=False) or {}
+ r'data-player-conf=(["\'])(?P<data>{.+?})\1', webpage,
+ 'player config', default='{}', group='data'),
+ video_id, transform_source=unescapeHTML, fatal=False)
+
+ if not player_config:
+ player_config = self._parse_json(
+ self._search_regex(
+ r'playerConf\s*=\s*({.+?})\s*;', webpage, 'player config',
+ default='{}'),
+ video_id, transform_source=js_to_json, fatal=False) or {}
+
+ source = player_config.get('source') or {}