]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/thisamericanlife.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class ThisAmericanLifeIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?thisamericanlife\.org/(?:radio-archives/episode/|play_full\.php\?play=)(?P<id>\d+)'
9 'url': 'http://www.thisamericanlife.org/radio-archives/episode/487/harper-high-school-part-one',
10 'md5': '8f7d2da8926298fdfca2ee37764c11ce',
14 'title': '487: Harper High School, Part One',
15 'description': 'md5:ee40bdf3fb96174a9027f76dbecea655',
16 'thumbnail': 're:^https?://.*\.jpg$',
19 'url': 'http://www.thisamericanlife.org/play_full.php?play=487',
20 'only_matching': True,
23 def _real_extract(self
, url
):
24 video_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(
27 'http://www.thisamericanlife.org/radio-archives/episode/%s' % video_id
, video_id
)
31 'url': 'http://stream.thisamericanlife.org/{0}/stream/{0}_64k.m3u8'.format(video_id
),
32 'protocol': 'm3u8_native',
37 'title': self
._html
_search
_meta
(r
'twitter:title', webpage
, 'title', fatal
=True),
38 'description': self
._html
_search
_meta
(r
'description', webpage
, 'description'),
39 'thumbnail': self
._og
_search
_thumbnail
(webpage
),