Browse Source

[brightcove:legacy] restrict videoPlayer value(closes #12040)

master-ytdl-org
Remita Amine 8 years ago
parent
commit
049a0f4d6d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      youtube_dl/extractor/brightcove.py

+ 4
- 0
youtube_dl/extractor/brightcove.py View File

@ -191,6 +191,10 @@ class BrightcoveLegacyIE(InfoExtractor):
# These fields hold the id of the video # These fields hold the id of the video
videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID') or find_param('@videoList') videoPlayer = find_param('@videoPlayer') or find_param('videoId') or find_param('videoID') or find_param('@videoList')
if videoPlayer is not None: 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 params['@videoPlayer'] = videoPlayer
linkBase = find_param('linkBaseURL') linkBase = find_param('linkBaseURL')
if linkBase is not None: if linkBase is not None:


Loading…
Cancel
Save