mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[ie/brightcove:new] Adapt to new AdobePass requirement (#13131)
Authored by: bashonly
This commit is contained in:
		| @@ -923,10 +923,18 @@ class BrightcoveNewIE(BrightcoveNewBaseIE): | ||||
|         errors = json_data.get('errors') | ||||
|         if errors and errors[0].get('error_subcode') == 'TVE_AUTH': | ||||
|             custom_fields = json_data['custom_fields'] | ||||
|             missing_fields = ', '.join( | ||||
|                 key for key in ('source_url', 'software_statement') if not smuggled_data.get(key)) | ||||
|             if missing_fields: | ||||
|                 raise ExtractorError( | ||||
|                     f'Missing fields in smuggled data: {missing_fields}. ' | ||||
|                     f'This video can be only extracted from the webpage where it is embedded. ' | ||||
|                     f'Pass the URL of the embedding webpage instead of the Brightcove URL', expected=True) | ||||
|             tve_token = self._extract_mvpd_auth( | ||||
|                 smuggled_data['source_url'], video_id, | ||||
|                 custom_fields['bcadobepassrequestorid'], | ||||
|                 custom_fields['bcadobepassresourceid']) | ||||
|                 custom_fields['bcadobepassresourceid'], | ||||
|                 smuggled_data['software_statement']) | ||||
|             json_data = self._download_json( | ||||
|                 api_url, video_id, headers={ | ||||
|                     'Accept': f'application/json;pk={policy_key}', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bashonly
					bashonly