- r"media_url\s*=\s*'([^']+)'", webpage, 'video url')
-
- info = self._search_json_ld(webpage, video_id, fatal=False)
- info.update(self.theplatform_url_result(
- media_url, video_id, {
- 'mbr': 'true',
- 'assetTypes': 'medium_video_s3'
- }))
+ [r"media_url\s*=\s*'(?P<url>[^']+)'",
+ r'data-media-url=(?P<url>(?:https?:)?//[^\s>]+)',
+ r'data-media-url=(["\'])(?P<url>(?:(?!\1).)+?)\1'],
+ webpage, 'video url', group='url')
+ theplatform_metadata = self._download_theplatform_metadata(self._search_regex(
+ r'https?://link\.theplatform\.com/s/([^?]+)', media_url, 'theplatform_path'), video_id)
+ info = self._parse_theplatform_metadata(theplatform_metadata)
+ auth = None
+ if theplatform_metadata.get('AETN$isBehindWall'):
+ requestor_id = self._DOMAIN_TO_REQUESTOR_ID[domain]
+ resource = self._get_mvpd_resource(
+ requestor_id, theplatform_metadata['title'],
+ theplatform_metadata.get('AETN$PPL_pplProgramId') or theplatform_metadata.get('AETN$PPL_pplProgramId_OLD'),
+ theplatform_metadata['ratings'][0]['rating'])
+ auth = self._extract_mvpd_auth(
+ url, video_id, requestor_id, resource)
+ info.update(self._search_json_ld(webpage, video_id, fatal=False))
+ info.update(self._extract_aen_smil(media_url, video_id, auth))