1 from .common
import InfoExtractor
8 class CinchcastIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://player\.cinchcast\.com/.*?(?:assetId|show_id)=(?P<id>[0-9]+)'
10 _EMBED_REGEX
= [r
'<iframe[^>]+?src=(["\'])(?P
<url
>https?
://player\
.cinchcast\
.com
/.+?
)\
1']
13 'url
': 'http
://player
.cinchcast
.com
/?show_id
=5258197&platformId
=1&assetType
=single
',
17 'title
': 'Train Your Brain to Up Your Game
with Coach Mandy
',
18 'upload_date
': '20130816',
21 # Actual test is run in generic, look for undergroundwellness
22 'url
': 'http
://player
.cinchcast
.com
/?platformId
=1&assetType=single&assetId=7141703',
23 'only_matching': True,
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
28 doc
= self
._download
_xml
(
29 'http://www.blogtalkradio.com/playerasset/mrss?assetType=single&assetId=%s' % video_id
,
32 item
= doc
.find('.//item')
33 title
= xpath_text(item
, './title', fatal
=True)
34 date_str
= xpath_text(
35 item
, './{http://developer.longtailvideo.com/trac/}date')
36 upload_date
= unified_strdate(date_str
, day_first
=False)
37 # duration is present but wrong
40 'url': item
.find('./{http://search.yahoo.com/mrss/}content').attrib
['url'],
42 backup_url
= xpath_text(
43 item
, './{http://developer.longtailvideo.com/trac/}backupContent')
46 'preference': 2, # seems to be more reliable
47 'format_id': 'backup',
54 'upload_date': upload_date
,