]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/charlierose.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from ..utils
import remove_end
7 class CharlieRoseIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?charlierose\.com/video(?:s|/player)/(?P<id>\d+)'
10 'url': 'https://charlierose.com/videos/27996',
14 'title': 'Remembering Zaha Hadid',
15 'thumbnail': 're:^https?://.*\.jpg\?\d+',
16 'description': 'We revisit past conversations with Zaha Hadid, in memory of the world renowned Iraqi architect.',
20 'skip_download': True,
24 _PLAYER_BASE
= 'https://charlierose.com/video/player/%s'
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
28 webpage
= self
._download
_webpage
(self
._PLAYER
_BASE
% video_id
, video_id
)
30 title
= remove_end(self
._og
_search
_title
(webpage
), ' - Charlie Rose')
32 entries
= self
._parse
_html
5_media
_entries
(self
._PLAYER
_BASE
% video_id
, webpage
, video_id
)[0]
33 formats
= entries
['formats']
35 self
._sort
_formats
(formats
)
36 self
._remove
_duplicate
_formats
(formats
)
42 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
43 'description': self
._og
_search
_description
(webpage
),
44 'subtitles': entries
.get('subtitles'),