[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 ( from ..utils import (
determine_ext, determine_ext,
dict_get,
ExtractorError, ExtractorError,
extract_attributes, extract_attributes,
find_xpath_attr, find_xpath_attr,
@ -513,10 +514,7 @@ class BrightcoveNewIE(InfoExtractor):
for video in re.findall(r'(?i)(<video[^>]+>)', webpage): for video in re.findall(r'(?i)(<video[^>]+>)', webpage):
attrs = extract_attributes(video) attrs = extract_attributes(video)
video_id = attrs.get('data-brightcove-video-id') video_id = dict_get(attrs, ['data-brightcove-video-id', 'data-video-id'])
if video_id is None:
video_id = attrs.get('data-video-id')
account_id = attrs.get('data-account') account_id = attrs.get('data-account')
player_id = attrs.get('data-player') player_id = attrs.get('data-player')
embed = attrs.get('data-embed') embed = attrs.get('data-embed')