- release_url = self._parse_json(self._search_regex(
- r'"fox_pdk_player"\s*:\s*({[^}]+?})', webpage, 'fox_pdk_player'),
- video_id)['release_url']
+ settings = self._parse_json(self._search_regex(
+ r'jQuery\.extend\(Drupal\.settings\s*,\s*({.+?})\);',
+ webpage, 'drupal settings'), video_id)
+ fox_pdk_player = settings['fox_pdk_player']
+ release_url = fox_pdk_player['release_url']
+ query = {
+ 'mbr': 'true',
+ 'switch': 'http'
+ }
+ if fox_pdk_player.get('access') == 'locked':
+ ap_p = settings['foxAdobePassProvider']
+ rating = ap_p.get('videoRating')
+ if rating == 'n/a':
+ rating = None
+ resource = self._get_mvpd_resource('fbc-fox', None, ap_p['videoGUID'], rating)
+ query['auth'] = self._extract_mvpd_auth(url, video_id, 'fbc-fox', resource)