summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/lumni.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:49:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:49:24 +0000
commit2415e66f889f38503b73e8ebc5f43ca342390e5c (patch)
treeac48ab69d1d96bae3d83756134921e0d90593aa5 /yt_dlp/extractor/lumni.py
parentInitial commit. (diff)
downloadyt-dlp-2415e66f889f38503b73e8ebc5f43ca342390e5c.tar.xz
yt-dlp-2415e66f889f38503b73e8ebc5f43ca342390e5c.zip
Adding upstream version 2024.03.10.upstream/2024.03.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/lumni.py')
-rw-r--r--yt_dlp/extractor/lumni.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/yt_dlp/extractor/lumni.py b/yt_dlp/extractor/lumni.py
new file mode 100644
index 0000000..5a95383
--- /dev/null
+++ b/yt_dlp/extractor/lumni.py
@@ -0,0 +1,23 @@
+from .francetv import FranceTVBaseInfoExtractor
+
+
+class LumniIE(FranceTVBaseInfoExtractor):
+ _VALID_URL = r'https?://(?:www\.)?lumni\.fr/video/(?P<id>[\w-]+)'
+ _TESTS = [{
+ 'url': 'https://www.lumni.fr/video/l-homme-et-son-environnement-dans-la-revolution-industrielle',
+ 'md5': '960e8240c4f2c7a20854503a71e52f5e',
+ 'info_dict': {
+ 'id': 'd2b9a4e5-a526-495b-866c-ab72737e3645',
+ 'ext': 'mp4',
+ 'title': "L'homme et son environnement dans la révolution industrielle - L'ère de l'homme",
+ 'thumbnail': 'https://assets.webservices.francetelevisions.fr/v1/assets/images/a7/17/9f/a7179f5f-63a5-4e11-8d4d-012ab942d905.jpg',
+ 'duration': 230,
+ }
+ }]
+
+ def _real_extract(self, url):
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+ video_id = self._html_search_regex(
+ r'<div[^>]+data-factoryid\s*=\s*["\']([^"\']+)', webpage, 'video id')
+ return self._make_url_result(video_id, url=url)