]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[brightcove:legacy] restrict videoPlayer value(closes #12040)
authorRemita Amine <remitamine@gmail.com>
Sat, 18 Feb 2017 20:07:09 +0000 (21:07 +0100)
committerRemita Amine <remitamine@gmail.com>
Sat, 18 Feb 2017 20:08:40 +0000 (21:08 +0100)
youtube_dl/extractor/brightcove.py

index 5c6e99da134efe150962dd979cbf36e391527d3a..27685eed0188312154463066293018496e875e5c 100644 (file)
@@ -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: