[Brightcove] dict_get not if .get(x): .get(y)

This commit is contained in:
John Hawkinson 2017-02-12 13:03:05 -05:00
parent e94df37ad6
commit 3de370796e

View File

@ -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)(<video[^>]+>)', 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')