aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-02-18 21:07:09 +0100
committerRemita Amine <remitamine@gmail.com>2017-02-18 21:08:40 +0100
commit049a0f4d6da55f4062658da7593363147c92f4a8 (patch)
treef7931ed7babbdf37985813a4769cd5f730a6c379
parentac33accd96279ee541952aaa4f0bb72b4f76b9ae (diff)
[brightcove:legacy] restrict videoPlayer value(closes #12040)
-rw-r--r--youtube_dl/extractor/brightcove.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py
index 5c6e99da1..27685eed0 100644
--- a/youtube_dl/extractor/brightcove.py
+++ b/youtube_dl/extractor/brightcove.py
@@ -191,6 +191,10 @@ class BrightcoveLegacyIE(InfoExtractor):
# These fields hold the id of the video
videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID') or find_param('@videoList')
if videoPlayer is not None:
+ if isinstance(videoPlayer, list):
+ videoPlayer = videoPlayer[0]
+ if not (videoPlayer.isdigit() or videoPlayer.startswith('ref:')):
+ return None
params['@videoPlayer'] = videoPlayer
linkBase = find_param('linkBaseURL')
if linkBase is not None: