A feature-rich command-line audio/video downloader
[brightcove:legacy] Relax videoPlayer validation check (closes #12381)
Sergey M․2e76bdc850ed
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.pyindex 66c8cb2198..46ef8e6052 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 Noneparams['@videoPlayer'] = videoPlayerlinkBase = find_param('linkBaseURL')