- webpage = self._download_webpage(url, video_id)
-
- api_vars = {
- 'id': video_id,
- 'type': 'player',
- 'url': 'http://api.shahid.net/api/v1_1',
- 'playerType': 'episode',
- }
-
- flashvars = self._search_regex(
- r'var\s+flashvars\s*=\s*({[^}]+})', webpage, 'flashvars', default=None)
- if flashvars:
- for key in api_vars.keys():
- value = self._search_regex(
- r'\b%s\s*:\s*(?P<q>["\'])(?P<value>.+?)(?P=q)' % key,
- flashvars, 'type', default=None, group='value')
- if value:
- api_vars[key] = value
+ player = self._call_api(
+ 'Content/Episode/%s' % video_id,
+ video_id, 'Downloading player JSON')