]>
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 'md5': '7bf08858ff7c203c870e8a6190e221e5',
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],
36 'description': self
._og
_search
_description
(webpage
),
37 'thumbnail': self
._og
_search
_thumbnail
(webpage
),