mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-18 15:55:30 +02:00
[ie/brightcove:new] Adapt to new AdobePass requirement (#13131)
Authored by: bashonly
This commit is contained in:
parent
0daddc780d
commit
98f8eec956
@ -923,10 +923,18 @@ class BrightcoveNewIE(BrightcoveNewBaseIE):
|
|||||||
errors = json_data.get('errors')
|
errors = json_data.get('errors')
|
||||||
if errors and errors[0].get('error_subcode') == 'TVE_AUTH':
|
if errors and errors[0].get('error_subcode') == 'TVE_AUTH':
|
||||||
custom_fields = json_data['custom_fields']
|
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(
|
tve_token = self._extract_mvpd_auth(
|
||||||
smuggled_data['source_url'], video_id,
|
smuggled_data['source_url'], video_id,
|
||||||
custom_fields['bcadobepassrequestorid'],
|
custom_fields['bcadobepassrequestorid'],
|
||||||
custom_fields['bcadobepassresourceid'])
|
custom_fields['bcadobepassresourceid'],
|
||||||
|
smuggled_data['software_statement'])
|
||||||
json_data = self._download_json(
|
json_data = self._download_json(
|
||||||
api_url, video_id, headers={
|
api_url, video_id, headers={
|
||||||
'Accept': f'application/json;pk={policy_key}',
|
'Accept': f'application/json;pk={policy_key}',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user