From 80df786df990bef1e801f56dcc3a8f48d51dddd0 Mon Sep 17 00:00:00 2001 From: John Hawkinson Date: Sat, 4 Mar 2017 22:25:33 -0500 Subject: [PATCH] [cbs.com:playlist] Tighten VALID_URL per test_all_urls File "test/test_all_urls.py", line 98, in test_no_duplicates '%s should not match URL %r . That URL belongs to %s.' % (type(ie).__name__, url, tc['name'])) AssertionError: CBSShowIE should not match URL u'http://www.cbs.com/shows/garth-brooks/video/_u7W953k6la293J7EPTd9oHkSPs6Xn6_/connect-chat-feat-garth-brooks/' . That URL belongs to CBS. Soltution is to anchor the regexp with a $, while permitting an optional terminal / --- youtube_dl/extractor/cbs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/cbs.py b/youtube_dl/extractor/cbs.py index c709df097..154152a1a 100644 --- a/youtube_dl/extractor/cbs.py +++ b/youtube_dl/extractor/cbs.py @@ -27,7 +27,7 @@ class CBSBaseIE(ThePlatformFeedIE): class CBSShowIE(InfoExtractor): IE_DESC = 'CBS show playlists, including full episodes and clips' IE_NAME = 'cbs.com:playlist' - _VALID_URL = r'(?i)https?://(?:www\.)cbs.com/shows/(?P[\w-]+)' + _VALID_URL = r'(?i)https?://(?:www\.)cbs.com/shows/(?P[\w-]+)/?$' _TEST = { 'url': 'http://www.cbs.com/shows/the-late-show-with-stephen-colbert', 'info_dict': {