]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cinchcast.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class CinchcastIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)'
14 # Actual test is run in generic, look for undergroundwellness
15 'url': 'http://player.cinchcast.com/?platformId=1&assetType=single&assetId=7141703',
16 'only_matching': True,
19 def _real_extract(self
, url
):
20 video_id
= self
._match
_id
(url
)
21 doc
= self
._download
_xml
(
22 'http://www.blogtalkradio.com/playerasset/mrss?assetType=single&assetId=%s' % video_id
,
25 item
= doc
.find('.//item')
26 title
= xpath_text(item
, './title', fatal
=True)
27 date_str
= xpath_text(
28 item
, './{http://developer.longtailvideo.com/trac/}date')
29 upload_date
= unified_strdate(date_str
, day_first
=False)
30 # duration is present but wrong
35 './{http://search.yahoo.com/mrss/}content').attrib
['url'],
37 backup_url
= xpath_text(
38 item
, './{http://developer.longtailvideo.com/trac/}backupContent')
41 'preference': 2, # seems to be more reliable
42 'format_id': 'backup',
45 self
._sort
_formats
(formats
)
50 'upload_date': upload_date
,