Skip to content

Commit

Permalink
[brightcove:legacy] restrict videoPlayer value(closes #12040)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Feb 18, 2017
1 parent ac33acc commit 049a0f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions youtube_dl/extractor/brightcove.py
Expand Up @@ -191,6 +191,10 @@ def find_param(name):
# 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:
Expand Down

0 comments on commit 049a0f4

Please sign in to comment.