A feature-rich command-line audio/video downloader
[brightcove] Don't use 'or' with the xml nodes, use the 'value' attribute instead
Jaime Marquínez Ferrándizd214fdb8fe79
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.pyindex 74a7d13e32..66fe0ac9ad 100644--- a/youtube_dl/extractor/brightcove.py+++ b/youtube_dl/extractor/brightcove.py@@ -76,18 +76,21 @@ class BrightcoveIE(InfoExtractor):'playerID': find_xpath_attr(object_doc, './param', 'name', 'playerID').attrib['value'],}def find_param(name):- return find_xpath_attr(object_doc, './param', 'name', name)+ node = find_xpath_attr(object_doc, './param', 'name', name)+ if node is not None:+ return node.attrib['value']+ return NoneplayerKey = find_param('playerKey')# Not all pages define this valueif playerKey is not None:- params['playerKey'] = playerKey.attrib['value']+ params['playerKey'] = playerKey# The three fields hold the id of the videovideoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID')if videoPlayer is not None:- params['@videoPlayer'] = videoPlayer.attrib['value']+ params['@videoPlayer'] = videoPlayerlinkBase = find_param('linkBaseURL')if linkBase is not None:- params['linkBaseURL'] = linkBase.attrib['value']+ params['linkBaseURL'] = linkBasedata = compat_urllib_parse.urlencode(params)return cls._FEDERATED_URL_TEMPLATE % data