]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/charlierose.py
4bf2cf7b0ce7648ec2786952220b452c20201a52
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',
11 'md5': 'fda41d49e67d4ce7c2411fd2c4702e09',
15 'title': 'Remembering Zaha Hadid',
16 'thumbnail': 're:^https?://.*\.jpg\?\d+',
17 'description': 'We revisit past conversations with Zaha Hadid, in memory of the world renowned Iraqi architect.',
25 'url': 'https://charlierose.com/videos/27996',
26 'only_matching': True,
29 _PLAYER_BASE
= 'https://charlierose.com/video/player/%s'
31 def _real_extract(self
, url
):
32 video_id
= self
._match
_id
(url
)
33 webpage
= self
._download
_webpage
(self
._PLAYER
_BASE
% video_id
, video_id
)
35 title
= remove_end(self
._og
_search
_title
(webpage
), ' - Charlie Rose')
37 info_dict
= self
._parse
_html
5_media
_entries
(
38 self
._PLAYER
_BASE
% video_id
, webpage
, video_id
,
39 m3u8_entry_protocol
='m3u8_native')[0]
41 self
._sort
_formats
(info_dict
['formats'])
42 self
._remove
_duplicate
_formats
(info_dict
['formats'])
47 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
48 'description': self
._og
_search
_description
(webpage
),