diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index 7cef3657d..cdc3d6024 100644 --- a/youtube_dl/extractor/brightcove.py +++ b/youtube_dl/extractor/brightcove.py @@ -16,6 +16,7 @@ from ..compat import ( ) from ..utils import ( determine_ext, + dict_get, ExtractorError, extract_attributes, find_xpath_attr, @@ -513,10 +514,7 @@ class BrightcoveNewIE(InfoExtractor): for video in re.findall(r'(?i)(]+>)', webpage): attrs = extract_attributes(video) - video_id = attrs.get('data-brightcove-video-id') - if video_id is None: - video_id = attrs.get('data-video-id') - + video_id = dict_get(attrs, ['data-brightcove-video-id', 'data-video-id']) account_id = attrs.get('data-account') player_id = attrs.get('data-player') embed = attrs.get('data-embed')