]>
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|show_id)=(?P<id>[0-9]+)'
14 'url': 'http://player.cinchcast.com/?show_id=5258197&platformId=1&assetType=single',
18 'title': 'Train Your Brain to Up Your Game with Coach Mandy',
19 'upload_date': '20130816',
22 # Actual test is run in generic, look for undergroundwellness
23 'url': 'http://player.cinchcast.com/?platformId=1&assetType=single&assetId=7141703',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
29 doc
= self
._download
_xml
(
30 'http://www.blogtalkradio.com/playerasset/mrss?assetType=single&assetId=%s' % video_id
,
33 item
= doc
.find('.//item')
34 title
= xpath_text(item
, './title', fatal
=True)
35 date_str
= xpath_text(
36 item
, './{http://developer.longtailvideo.com/trac/}date')
37 upload_date
= unified_strdate(date_str
, day_first
=False)
38 # duration is present but wrong
41 'url': item
.find('./{http://search.yahoo.com/mrss/}content').attrib
['url'],
43 backup_url
= xpath_text(
44 item
, './{http://developer.longtailvideo.com/trac/}backupContent')
47 'preference': 2, # seems to be more reliable
48 'format_id': 'backup',
51 self
._sort
_formats
(formats
)
56 'upload_date': upload_date
,