mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 08:19:57 +01:00
[brightcove] Support alternative BrightcoveExperience layout
The full URL lays in the `data` attribute of <object> (#8862)
This commit is contained in:
parent
62cdb96f51
commit
5964b598ff
@ -136,13 +136,16 @@ def _build_brighcove_url(cls, object_str):
|
|||||||
else:
|
else:
|
||||||
flashvars = {}
|
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):
|
def find_param(name):
|
||||||
if name in flashvars:
|
if name in flashvars:
|
||||||
return flashvars[name]
|
return flashvars[name]
|
||||||
node = find_xpath_attr(object_doc, './param', 'name', name)
|
node = find_xpath_attr(object_doc, './param', 'name', name)
|
||||||
if node is not None:
|
if node is not None:
|
||||||
return node.attrib['value']
|
return node.attrib['value']
|
||||||
return None
|
return data_url_params.get(name)
|
||||||
|
|
||||||
params = {}
|
params = {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user