mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[brightcove:legacy] fall back to brightcove:new(#13912)
This commit is contained in:
parent
f0ee386851
commit
ee5fe42e44
1 changed files with 12 additions and 2 deletions
|
@ -356,7 +356,9 @@ def _get_playlist_info(self, player_key):
|
|||
|
||||
def _extract_video_info(self, video_info):
|
||||
video_id = compat_str(video_info['id'])
|
||||
|
||||
publisher_id = video_info.get('publisherId')
|
||||
|
||||
info = {
|
||||
'id': video_id,
|
||||
'title': video_info['displayName'].strip(),
|
||||
|
@ -444,8 +446,16 @@ def _extract_video_info(self, video_info):
|
|||
else:
|
||||
return ad_info
|
||||
|
||||
if 'url' not in info and not info.get('formats'):
|
||||
raise ExtractorError('Unable to extract video url for %s' % video_id)
|
||||
if not info.get('url') and not info.get('formats'):
|
||||
uploader_id = info.get('uploader_id')
|
||||
if uploader_id:
|
||||
info.update({
|
||||
'_type': 'url',
|
||||
'url': 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s' % (uploader_id, video_id),
|
||||
'ie_key': BrightcoveNewIE.ie_key(),
|
||||
})
|
||||
else:
|
||||
raise ExtractorError('Unable to extract video url for %s' % video_id)
|
||||
return info
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue