[ie/wistia] Support password-protected videos (#11100)
[yt-dlp3.git] / yt_dlp / extractor / breitbart.py
blobfedf4772a97488b1258731a13addc6638352fece
1 from .common import InfoExtractor
4 class BreitBartIE(InfoExtractor):
5 _VALID_URL = r'https?://(?:www\.)?breitbart\.com/videos/v/(?P<id>[^/?#]+)'
6 _TESTS = [{
7 'url': 'https://www.breitbart.com/videos/v/5cOz1yup/?pl=Ij6NDOji',
8 'md5': '0aa6d1d6e183ac5ca09207fe49f17ade',
9 'info_dict': {
10 'id': '5cOz1yup',
11 'ext': 'mp4',
12 'title': 'Watch \u2013 Clyburn: Statues in Congress Have to Go Because they Are Honoring Slavery',
13 'description': 'md5:bac35eb0256d1cb17f517f54c79404d5',
14 'thumbnail': 'https://cdn.jwplayer.com/thumbs/5cOz1yup-1920.jpg',
15 'age_limit': 0,
17 }, {
18 'url': 'https://www.breitbart.com/videos/v/eaiZjVOn/',
19 'only_matching': True,
22 def _real_extract(self, url):
23 video_id = self._match_id(url)
24 webpage = self._download_webpage(url, video_id)
26 formats = self._extract_m3u8_formats(f'https://cdn.jwplayer.com/manifests/{video_id}.m3u8', video_id, ext='mp4')
27 return {
28 'id': video_id,
29 'title': self._generic_title('', webpage),
30 'description': self._og_search_description(webpage),
31 'thumbnail': self._og_search_thumbnail(webpage),
32 'age_limit': self._rta_search(webpage),
33 'formats': formats,