]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/freespeech.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from .youtube
import YoutubeIE
7 class FreespeechIE(InfoExtractor
):
8 IE_NAME
= 'freespeech.org'
9 _VALID_URL
= r
'https?://(?:www\.)?freespeech\.org/stories/(?P<id>.+)'
11 'add_ie': ['Youtube'],
12 'url': 'http://www.freespeech.org/stories/fcc-announces-net-neutrality-rollback-whats-stake/',
16 'title': 'What\'s At Stake - Net Neutrality Special',
17 'description': 'Presented by MNN and FSTV',
18 'upload_date': '20170728',
19 'uploader_id': 'freespeechtv',
20 'uploader': 'freespeechtv',
24 def _real_extract(self
, url
):
25 display_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, display_id
)
27 youtube_url
= self
._search
_regex
(
28 r
'data-video-url="([^"]+)"',
29 webpage
, 'youtube url')
31 return self
.url_result(youtube_url
, YoutubeIE
.ie_key())