]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/freespeech.py
1 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class FreespeechIE(InfoExtractor
):
10 IE_NAME
= 'freespeech.org'
11 _VALID_URL
= r
'https://www\.freespeech\.org/video/(?P<title>.+)'
13 'add_ie': ['Youtube'],
14 'url': 'https://www.freespeech.org/video/obama-romney-campaign-colorado-ahead-debate-0',
18 'title': 'Obama, Romney Campaign in Colorado Ahead of Debate',
19 'description': 'Obama, Romney Campaign in Colorado Ahead of Debate',
20 'uploader': 'freespeechtv',
21 'uploader_id': 'freespeechtv',
22 'upload_date': '20121002',
26 def _real_extract(self
, url
):
27 mobj
= re
.match(self
._VALID
_URL
, url
)
28 title
= mobj
.group('title')
29 webpage
= self
._download
_webpage
(url
, title
)
30 info_json
= self
._search
_regex
(r
'jQuery.extend\(Drupal.settings, ({.*?})\);', webpage
, 'info')
31 info
= json
.loads(info_json
)
35 'url': info
['jw_player']['basic_video_node_player']['file'],