2 from __future__ import unicode_literals
4 from .common import InfoExtractor
12 class CinchcastIE(InfoExtractor):
13 _VALID_URL = r'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)'
15 # Actual test is run in generic, look for undergroundwellness
16 'url': 'http://player.cinchcast.com/?platformId=1&assetType=single&assetId=7141703',
17 'only_matching': True,
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 doc = self._download_xml(
23 'http://www.blogtalkradio.com/playerasset/mrss?assetType=single&assetId=%s' % video_id,
26 item = doc.find('.//item')
27 title = xpath_text(item, './title', fatal=True)
28 date_str = xpath_text(
29 item, './{http://developer.longtailvideo.com/trac/}date')
30 upload_date = unified_strdate(date_str, day_first=False)
31 # duration is present but wrong
36 './{http://search.yahoo.com/mrss/}content').attrib['url'],
38 backup_url = xpath_text(
39 item, './{http://developer.longtailvideo.com/trac/}backupContent')
42 'preference': 2, # seems to be more reliable
43 'format_id': 'backup',
46 self._sort_formats(formats)
51 'upload_date': upload_date,