]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/breitbart.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class BreitBartIE(InfoExtractor
):
7 _VALID_URL
= r
'https?:\/\/(?:www\.)breitbart.com/videos/v/(?P<id>[^/]+)'
9 'url': 'https://www.breitbart.com/videos/v/5cOz1yup/?pl=Ij6NDOji',
10 'md5': '0aa6d1d6e183ac5ca09207fe49f17ade',
14 'title': 'Watch \u2013 Clyburn: Statues in Congress Have to Go Because they Are Honoring Slavery',
15 'description': 'md5:bac35eb0256d1cb17f517f54c79404d5',
16 'thumbnail': 'https://cdn.jwplayer.com/thumbs/5cOz1yup-1920.jpg',
20 'url': 'https://www.breitbart.com/videos/v/eaiZjVOn/',
21 'only_matching': True,
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, video_id
)
28 formats
= self
._extract
_m
3u8_formats
(f
'https://cdn.jwplayer.com/manifests/{video_id}.m3u8', video_id
, ext
='mp4')
29 self
._sort
_formats
(formats
)
32 'title': self
._og
_search
_title
(
33 webpage
, default
=None) or self
._html
_search
_regex
(
34 r
'(?s)<title>(.*?)</title>', webpage
, 'video title'),
35 'description': self
._og
_search
_description
(webpage
),
36 'thumbnail': self
._og
_search
_thumbnail
(webpage
),
37 'age_limit': self
._rta
_search
(webpage
),