]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/cinchcast.py
393df36984146e54bfcffcf0f6e7827ee279662a
1 from .common
import InfoExtractor
8 class CinchcastIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://player\.cinchcast\.com/.*?(?:assetId|show_id)=(?P<id>[0-9]+)'
11 'url': 'http://player.cinchcast.com/?show_id=5258197&platformId=1&assetType=single',
15 'title': 'Train Your Brain to Up Your Game with Coach Mandy',
16 'upload_date': '20130816',
19 # Actual test is run in generic, look for undergroundwellness
20 'url': 'http://player.cinchcast.com/?platformId=1&assetType=single&assetId=7141703',
21 'only_matching': True,
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 doc
= self
._download
_xml
(
27 'http://www.blogtalkradio.com/playerasset/mrss?assetType=single&assetId=%s' % video_id
,
30 item
= doc
.find('.//item')
31 title
= xpath_text(item
, './title', fatal
=True)
32 date_str
= xpath_text(
33 item
, './{http://developer.longtailvideo.com/trac/}date')
34 upload_date
= unified_strdate(date_str
, day_first
=False)
35 # duration is present but wrong
38 'url': item
.find('./{http://search.yahoo.com/mrss/}content').attrib
['url'],
40 backup_url
= xpath_text(
41 item
, './{http://developer.longtailvideo.com/trac/}backupContent')
44 'preference': 2, # seems to be more reliable
45 'format_id': 'backup',
48 self
._sort
_formats
(formats
)
53 'upload_date': upload_date
,