projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[pyvideo] add support for videos that don't come from Youtube
[youtube-dl]
/
youtube_dl
/
extractor
/
brightcove.py
diff --git
a/youtube_dl/extractor/brightcove.py
b/youtube_dl/extractor/brightcove.py
index 74a7d13e32f8662ba93c9ff3e27826f6d27ed648..66fe0ac9ade6fad80d77f0429c136c2d022af16d 100644
(file)
--- 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):
'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 None
playerKey = find_param('playerKey')
# Not all pages define this value
if playerKey is not None:
playerKey = find_param('playerKey')
# Not all pages define this value
if playerKey is not None:
- params['playerKey'] = playerKey
.attrib['value']
+ params['playerKey'] = playerKey
# The three fields hold the id of the video
videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID')
if videoPlayer is not None:
# The three fields hold the id of the video
videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID')
if videoPlayer is not None:
- params['@videoPlayer'] = videoPlayer
.attrib['value']
+ params['@videoPlayer'] = videoPlayer
linkBase = find_param('linkBaseURL')
if linkBase is not None:
linkBase = find_param('linkBaseURL')
if linkBase is not None:
- params['linkBaseURL'] = linkBase
.attrib['value']
+ params['linkBaseURL'] = linkBase
data = compat_urllib_parse.urlencode(params)
return cls._FEDERATED_URL_TEMPLATE % data
data = compat_urllib_parse.urlencode(params)
return cls._FEDERATED_URL_TEMPLATE % data