]> jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/lumni.py
[extractor/youtube] Add client name to `format_note` when `-v` (#6254)
[yt-dlp.git] / yt_dlp / extractor / lumni.py
1 from .common import InfoExtractor
2 from .francetv import FranceTVIE
3
4
5 class LumniIE(InfoExtractor):
6 _VALID_URL = r'https?://(?:www\.)?lumni\.fr/video/(?P<id>[\w-]+)'
7 _TESTS = [{
8 'url': 'https://www.lumni.fr/video/l-homme-et-son-environnement-dans-la-revolution-industrielle',
9 'md5': '960e8240c4f2c7a20854503a71e52f5e',
10 'info_dict': {
11 'id': 'd2b9a4e5-a526-495b-866c-ab72737e3645',
12 'ext': 'mp4',
13 'title': "L'homme et son environnement dans la révolution industrielle - L'ère de l'homme",
14 'thumbnail': 'https://assets.webservices.francetelevisions.fr/v1/assets/images/a7/17/9f/a7179f5f-63a5-4e11-8d4d-012ab942d905.jpg',
15 'duration': 230,
16 }
17 }]
18
19 def _real_extract(self, url):
20 display_id = self._match_id(url)
21 webpage = self._download_webpage(url, display_id)
22 video_id = self._html_search_regex(
23 r'<div[^>]+data-factoryid\s*=\s*["\']([^"\']+)', webpage, 'video id')
24 return self.url_result(f'francetv:{video_id}', FranceTVIE, video_id)