- if android_webpage is not None:
- player_params_str = self._search_regex(
- 'mobileReplacePlayerDivTwoQual\(([^)]+)\)',
- android_webpage, 'player parameters', default='')
- player_params = list(map(lambda s: s.strip(' \''), player_params_str.split(',')))
- if player_params:
- formats.extend([{
- 'url': param,
- 'preference': -10,
- } for param in player_params if determine_ext(param) == 'mp4'])
+ for kind, _, format_url in re.findall(
+ r'setVideo([^(]+)\((["\'])(http.+?)\2\)', webpage):
+ format_id = kind.lower()
+ if format_id == 'hls':
+ formats.extend(self._extract_m3u8_formats(
+ format_url, video_id, 'mp4',
+ entry_protocol='m3u8_native', m3u8_id='hls', fatal=False))
+ elif format_id in ('urllow', 'urlhigh'):
+ formats.append({
+ 'url': format_url,
+ 'format_id': '%s-%s' % (determine_ext(format_url, 'mp4'), format_id[3:]),
+ 'quality': -2 if format_id.endswith('low') else None,
+ })