aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-07 22:59:33 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-07 22:59:33 +0700
commit2e76bdc850ed5d5ffe95578b576b8fb66dcea8f4 (patch)
tree7a4131579bc66136257e9d32ba44152cc27333c8 /youtube_dl
parentfe646a2f106fef0651158c460dd766c236e2f5db (diff)
[brightcove:legacy] Relax videoPlayer validation check (closes #12381)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/brightcove.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py
index 66c8cb219..46ef8e605 100644
--- a/youtube_dl/extractor/brightcove.py
+++ b/youtube_dl/extractor/brightcove.py
@@ -193,7 +193,13 @@ class BrightcoveLegacyIE(InfoExtractor):
if videoPlayer is not None:
if isinstance(videoPlayer, list):
videoPlayer = videoPlayer[0]
- if not (videoPlayer.isdigit() or videoPlayer.startswith('ref:')):
+ videoPlayer = videoPlayer.strip()
+ # UUID is also possible for videoPlayer (e.g.
+ # http://www.popcornflix.com/hoodies-vs-hooligans/7f2d2b87-bbf2-4623-acfb-ea942b4f01dd
+ # or http://www8.hp.com/cn/zh/home.html)
+ if not (re.match(
+ r'^(?:\d+|[\da-fA-F]{8}-?[\da-fA-F]{4}-?[\da-fA-F]{4}-?[\da-fA-F]{4}-?[\da-fA-F]{12})$',
+ videoPlayer) or videoPlayer.startswith('ref:')):
return None
params['@videoPlayer'] = videoPlayer
linkBase = find_param('linkBaseURL')