1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-24 15:27:55 +01:00

[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 /
This commit is contained in:
John Hawkinson 2017-03-04 22:25:33 -05:00
parent 34724e37bb
commit 80df786df9

View File

@ -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<id>[\w-]+)'
_VALID_URL = r'(?i)https?://(?:www\.)cbs.com/shows/(?P<id>[\w-]+)/?$'
_TEST = {
'url': 'http://www.cbs.com/shows/the-late-show-with-stephen-colbert',
'info_dict': {