1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-23 17:22:52 +08:00

[bfmbusiness] Add new extractor

This commit is contained in:
Mathieu Rousse 2018-02-21 14:40:11 +01:00
parent 8315ee6c4c
commit b93d57a3fa
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,32 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class BFMBusinessIE(InfoExtractor):
_VALID_URL = r'https?://bfmbusiness\.bfmtv\.com/mediaplayer/video/.*?-(?P<id>[\d-]+).html'
_TEST = {
'url': 'http://bfmbusiness.bfmtv.com/mediaplayer/video/focus-sur-les-mathematiques-1902-1038229.html',
'info_dict': {
'id': '5737041255001',
'ext': 'mp4',
'title': 'Focus sur les mathématiques - 19/02',
'uploader_id': '876450612001',
},
'params': {
'skip_download': True,
},
'skip': 'only available for a week',
}
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/876450612001/default_default/index.html?videoId=%s'
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
brightcove_id = self._search_regex(
r'data-video-id=["\'](\d+)', webpage, 'brightcove id')
return self.url_result(
self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew',
brightcove_id)

View File

@ -110,6 +110,7 @@ from .behindkink import BehindKinkIE
from .bellmedia import BellMediaIE
from .beatport import BeatportIE
from .bet import BetIE
from .bfmbusiness import BFMBusinessIE
from .bigflix import BigflixIE
from .bild import BildIE
from .bilibili import (