You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
939 B

  1. import re
  2. from .common import InfoExtractor
  3. class BloombergIE(InfoExtractor):
  4. _VALID_URL = r'https?://www\.bloomberg\.com/video/(?P<name>.+?).html'
  5. _TEST = {
  6. u'url': u'http://www.bloomberg.com/video/shah-s-presentation-on-foreign-exchange-strategies-qurhIVlJSB6hzkVi229d8g.html',
  7. u'file': u'12bzhqZTqQHmmlA8I-i0NpzJgcG5NNYX.mp4',
  8. u'info_dict': {
  9. u'title': u'Shah\'s Presentation on Foreign-Exchange Strategies',
  10. u'description': u'md5:abc86e5236f9f0e4866c59ad36736686',
  11. },
  12. u'params': {
  13. # Requires ffmpeg (m3u8 manifest)
  14. u'skip_download': True,
  15. },
  16. }
  17. def _real_extract(self, url):
  18. mobj = re.match(self._VALID_URL, url)
  19. name = mobj.group('name')
  20. webpage = self._download_webpage(url, name)
  21. ooyala_url = self._og_search_video_url(webpage)
  22. return self.url_result(ooyala_url, ie='Ooyala')