1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[brightcove] Support alternative BrightcoveExperience layout

The full URL lays in the `data` attribute of <object> (#8862)
This commit is contained in:
Yen Chi Hsuan 2016-03-25 16:17:54 +08:00
parent 62cdb96f51
commit 5964b598ff

View file

@ -136,13 +136,16 @@ class BrightcoveLegacyIE(InfoExtractor):
else:
flashvars = {}
data_url = object_doc.attrib.get('data', '')
data_url_params = compat_parse_qs(compat_urllib_parse_urlparse(data_url).query)
def find_param(name):
if name in flashvars:
return flashvars[name]
node = find_xpath_attr(object_doc, './param', 'name', name)
if node is not None:
return node.attrib['value']
return None
return data_url_params.get(name)
params = {}