- def _parse_smil_subtitles(self, smil, namespace=None, subtitles_lang='en'):
- closed_caption_e = find_xpath_attr(smil, self._xpath_ns('.//param', namespace), 'name', 'ClosedCaptionURL')
- return {
- 'en': [{
- 'ext': 'ttml',
- 'url': closed_caption_e.attrib['value'],
- }]
- } if closed_caption_e is not None and closed_caption_e.attrib.get('value') else []
-
- def _real_extract(self, url):
- display_id = self._match_id(url)
- webpage = self._download_webpage(url, display_id)
- content_id = self._search_regex(
- [r"video\.settings\.content_id\s*=\s*'([^']+)';", r"cbsplayer\.contentId\s*=\s*'([^']+)';"],
- webpage, 'content id')
- items_data = self._download_xml(
- 'http://can.cbs.com/thunder/player/videoPlayerService.php',
- content_id, query={'partner': 'cbs', 'contentId': content_id})
- video_data = xpath_element(items_data, './/item')
- title = xpath_text(video_data, 'videoTitle', 'title', True)
-
- subtitles = {}
- formats = []
- for item in items_data.findall('.//item'):
- pid = xpath_text(item, 'pid')
- if not pid:
- continue
+ def _extract_video_info(self, guid):
+ path = 'dJ5BDC/media/guid/2198311517/' + guid
+ smil_url = 'http://link.theplatform.com/s/%s?mbr=true' % path
+ formats, subtitles = self._extract_theplatform_smil(smil_url + '&manifest=m3u', guid)
+ for r in ('HLS&formats=M3U', 'RTMP', 'WIFI', '3G'):