- if typ == 'film':
- video_id = self._search_regex(r'href="/video/player_gen_cmedia=([0-9]+).+"', webpage, 'video id')
- else:
- player = self._search_regex(r'data-player=\'([^\']+)\'>', webpage, 'data player', default=None)
- if player:
- player_data = json.loads(player)
- video_id = compat_str(player_data['refMedia'])
- else:
- model = self._search_regex(r'data-model="([^"]+)">', webpage, 'data model')
- model_data = self._parse_json(unescapeHTML(model), display_id)
- video_id = compat_str(model_data['id'])