From c755f1901f0c22c60fbe32403484f25882449c8a Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 1 May 2021 18:41:37 +0530 Subject: [PATCH] [CBS] Improve `_VALID_URL` to support movies Closes #290 Tested by: BeeMuffins --- yt_dlp/extractor/cbs.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/cbs.py b/yt_dlp/extractor/cbs.py index 38c8bbc80..ac3057d59 100644 --- a/yt_dlp/extractor/cbs.py +++ b/yt_dlp/extractor/cbs.py @@ -27,7 +27,13 @@ def _parse_smil_subtitles(self, smil, namespace=None, subtitles_lang='en'): class CBSIE(CBSBaseIE): - _VALID_URL = r'(?:cbs:|https?://(?:www\.)?(?:(?:cbs|paramountplus)\.com/shows/[^/]+/video|colbertlateshow\.com/(?:video|podcasts))/)(?P[\w-]+)' + _VALID_URL = r'''(?x) + (?: + cbs:| + https?://(?:www\.)?(?: + (?:cbs|paramountplus)\.com/(?:shows/[^/]+/video|movies/[^/]+)/| + colbertlateshow\.com/(?:video|podcasts)/) + )(?P[\w-]+)''' _TESTS = [{ 'url': 'https://www.cbs.com/shows/garth-brooks/video/_u7W953k6la293J7EPTd9oHkSPs6Xn6_/connect-chat-feat-garth-brooks/', @@ -55,6 +61,9 @@ class CBSIE(CBSBaseIE): }, { 'url': 'https://www.paramountplus.com/shows/all-rise/video/QmR1WhNkh1a_IrdHZrbcRklm176X_rVc/all-rise-space/', 'only_matching': True, + }, { + 'url': 'https://www.paramountplus.com/movies/million-dollar-american-princesses-meghan-and-harry/C0LpgNwXYeB8txxycdWdR9TjxpJOsdCq', + 'only_matching': True, }] def _extract_video_info(self, content_id, site='cbs', mpx_acc=2198311517):