]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/bloomberg.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class BloombergIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://www\.bloomberg\.com/video/(?P<name>.+?)\.html'
12 'url': 'http://www.bloomberg.com/video/shah-s-presentation-on-foreign-exchange-strategies-qurhIVlJSB6hzkVi229d8g.html',
13 # The md5 checksum changes
15 'id': 'qurhIVlJSB6hzkVi229d8g',
17 'title': 'Shah\'s Presentation on Foreign-Exchange Strategies',
18 'description': 'md5:0681e0d30dcdfc6abf34594961d8ea88',
22 def _real_extract(self
, url
):
23 mobj
= re
.match(self
._VALID
_URL
, url
)
24 name
= mobj
.group('name')
25 webpage
= self
._download
_webpage
(url
, name
)
26 f4m_url
= self
._search
_regex
(
27 r
'<source src="(https?://[^"]+\.f4m.*?)"', webpage
,
29 title
= re
.sub(': Video$', '', self
._og
_search
_title
(webpage
))
32 'id': name
.split('-')[-1],
34 'formats': self
._extract
_f
4m
_formats
(f4m_url
, name
),
35 'description': self
._og
_search
_description
(webpage
),
36 'thumbnail': self
._og
_search
_thumbnail
(webpage
),