1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class CBSIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?cbs\.com/shows/[^/]+/(?:video|artist)/(?P<id>[^/]+)/.*'
12 'url': 'http://www.cbs.com/shows/garth-brooks/video/_u7W953k6la293J7EPTd9oHkSPs6Xn6_/connect-chat-feat-garth-brooks/',
16 'title': 'Connect Chat feat. Garth Brooks',
17 'description': 'Connect with country music singer Garth Brooks, as he chats with fans on Wednesday November 27, 2013. Be sure to tune in to Garth Brooks: Live from Las Vegas, Friday November 29, at 9/8c on CBS!',
22 'skip_download': True,
24 '_skip': 'Blocked outside the US',
26 'url': 'http://www.cbs.com/shows/liveonletterman/artist/221752/st-vincent/',
30 'title': 'Live on Letterman - St. Vincent',
31 'description': 'Live On Letterman: St. Vincent in concert from New York\'s Ed Sullivan Theater on Tuesday, July 16, 2014.',
36 'skip_download': True,
38 '_skip': 'Blocked outside the US',
41 def _real_extract(self, url):
42 mobj = re.match(self._VALID_URL, url)
43 video_id = mobj.group('id')
44 webpage = self._download_webpage(url, video_id)
45 real_id = self._search_regex(
46 r"video\.settings\.pid\s*=\s*'([^']+)';",
47 webpage, 'real video ID')
48 return self.url_result(u'theplatform:%s' % real_id)