- 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._download_json(
- 'https://shahid.mbc.net/arContent/getPlayerContent-param-.id-%s.type-%s.html'
- % (video_id, api_vars['type']), video_id, 'Downloading player JSON')
+ player = self._call_api(
+ 'Content/Episode/%s' % video_id,
+ video_id, 'Downloading player JSON')