[rh:websockets] Support websockets 14.0+ (#11616)
[yt-dlp3.git] / yt_dlp / extractor / freespeech.py
blobaea551379b84dfa4f7fdd133d499b85cbccf54fb
1 from .common import InfoExtractor
2 from .youtube import YoutubeIE
5 class FreespeechIE(InfoExtractor):
6 IE_NAME = 'freespeech.org'
7 _VALID_URL = r'https?://(?:www\.)?freespeech\.org/stories/(?P<id>.+)'
8 _TEST = {
9 'add_ie': ['Youtube'],
10 'url': 'http://www.freespeech.org/stories/fcc-announces-net-neutrality-rollback-whats-stake/',
11 'info_dict': {
12 'id': 'waRk6IPqyWM',
13 'ext': 'mp4',
14 'title': 'What\'s At Stake - Net Neutrality Special',
15 'description': 'Presented by MNN and FSTV',
16 'upload_date': '20170728',
17 'uploader_id': 'freespeechtv',
18 'uploader': 'freespeechtv',
22 def _real_extract(self, url):
23 display_id = self._match_id(url)
24 webpage = self._download_webpage(url, display_id)
25 youtube_url = self._search_regex(
26 r'data-video-url="([^"]+)"',
27 webpage, 'youtube url')
29 return self.url_result(youtube_url, YoutubeIE.ie_key())