|
@ -4,7 +4,7 @@ from .common import InfoExtractor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CBSIE(InfoExtractor): |
|
|
class CBSIE(InfoExtractor): |
|
|
_VALID_URL = r'https?://(?:www\.)?cbs\.com/shows/[^/]+/(?:video|artist)/(?P<id>[^/]+)/.*' |
|
|
|
|
|
|
|
|
_VALID_URL = r'https?://(?:(?:www\.)?cbs\.com/shows/[^/]+/(?:video|artist)|colbertlateshow\.com/(?:video|podcasts))/(?P<id>[^/]+)/.*' |
|
|
|
|
|
|
|
|
_TESTS = [{ |
|
|
_TESTS = [{ |
|
|
'url': 'http://www.cbs.com/shows/garth-brooks/video/_u7W953k6la293J7EPTd9oHkSPs6Xn6_/connect-chat-feat-garth-brooks/', |
|
|
'url': 'http://www.cbs.com/shows/garth-brooks/video/_u7W953k6la293J7EPTd9oHkSPs6Xn6_/connect-chat-feat-garth-brooks/', |
|
@ -34,12 +34,18 @@ class CBSIE(InfoExtractor): |
|
|
'skip_download': True, |
|
|
'skip_download': True, |
|
|
}, |
|
|
}, |
|
|
'_skip': 'Blocked outside the US', |
|
|
'_skip': 'Blocked outside the US', |
|
|
|
|
|
}, { |
|
|
|
|
|
'url': 'http://colbertlateshow.com/video/8GmB0oY0McANFvp2aEffk9jZZZ2YyXxy/the-colbeard/', |
|
|
|
|
|
'only_matching': True, |
|
|
|
|
|
}, { |
|
|
|
|
|
'url': 'http://colbertlateshow.com/podcasts/dYSwjqPs_X1tvbV_P2FcPWRa_qT6akTC/in-the-bad-room-with-stephen/', |
|
|
|
|
|
'only_matching': True, |
|
|
}] |
|
|
}] |
|
|
|
|
|
|
|
|
def _real_extract(self, url): |
|
|
def _real_extract(self, url): |
|
|
video_id = self._match_id(url) |
|
|
video_id = self._match_id(url) |
|
|
webpage = self._download_webpage(url, video_id) |
|
|
webpage = self._download_webpage(url, video_id) |
|
|
real_id = self._search_regex( |
|
|
real_id = self._search_regex( |
|
|
r"video\.settings\.pid\s*=\s*'([^']+)';", |
|
|
|
|
|
|
|
|
[r"video\.settings\.pid\s*=\s*'([^']+)';", r"cbsplayer\.pid\s*=\s*'([^']+)';"], |
|
|
webpage, 'real video ID') |
|
|
webpage, 'real video ID') |
|
|
return self.url_result('theplatform:%s' % real_id) |
|
|
return self.url_result('theplatform:%s' % real_id) |