From 2eb268c3ff057026f59e03c29e0ea02535babcbe Mon Sep 17 00:00:00 2001 From: Florentin Le Moal Date: Wed, 10 Jul 2024 23:16:44 +0200 Subject: [PATCH] Reverted RTVEInfantil deletion --- yt_dlp/extractor/_extractors.py | 1 + yt_dlp/extractor/rtve.py | 33 ++++++++++++++++++++------------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py index e3d3680f2b..4b1f4c316d 100644 --- a/yt_dlp/extractor/_extractors.py +++ b/yt_dlp/extractor/_extractors.py @@ -1761,6 +1761,7 @@ from .rtvcplay import ( from .rtve import ( RTVEALaCartaIE, RTVEAudioIE, + RTVEInfantilIE, RTVELiveIE, RTVETelevisionIE, ) diff --git a/yt_dlp/extractor/rtve.py b/yt_dlp/extractor/rtve.py index c9e090f82f..4f9ade67c7 100644 --- a/yt_dlp/extractor/rtve.py +++ b/yt_dlp/extractor/rtve.py @@ -18,7 +18,6 @@ class RTVEALaCartaIE(InfoExtractor): _VALID_URL = [ r'https?://(?:www\.)?rtve\.es/(m/)?(alacarta/videos|filmoteca)/[^/]+/[^/]+/(?P\d+)', r'https?://(?:www\.)?rtve\.es/(m/)?play/videos/[^/]+/[^/]+/(?P\d+)', - r'https?://(?:www\.)?rtve\.es/infantil/serie/[^/]+/video/[^/]+/(?P[0-9]+)/', ] _TESTS = [{ @@ -65,18 +64,6 @@ class RTVEALaCartaIE(InfoExtractor): }, { 'url': 'http://www.rtve.es/filmoteca/no-do/not-1-introduccion-primer-noticiario-espanol/1465256/', 'only_matching': True, - }, { - 'url': 'https://www.rtve.es/infantil/serie/agus-lui-churros-crafts/video/gusano/7048976/', - 'md5': '7da8391b203a2d9cb665f11fae025e72', - 'info_dict': { - 'id': '7048976', - 'ext': 'mp4', - 'title': 'Gusano', - 'thumbnail': r're:https://img2\.rtve\.es/v/.*\.png', - 'duration': 292.86, - 'series': 'Agus & Lui: Churros y Crafts', - }, - 'expected_warnings': ['Failed to download MPD manifest', 'Failed to download m3u8 information'], }, { 'url': 'https://www.rtve.es/play/videos/saber-vivir/07-07-24/16177116/', 'md5': '9eebcf6e8d6306c3b7c46e86a0115f55', @@ -300,6 +287,26 @@ class RTVEAudioIE(RTVEALaCartaIE): # XXX: Do not subclass from concrete IE } +class RTVEInfantilIE(RTVEALaCartaIE): # XXX: Do not subclass from concrete IE + IE_NAME = 'rtve.es:infantil' + IE_DESC = 'RTVE infantil' + _VALID_URL = r'https?://(?:www\.)?rtve\.es/infantil/serie/[^/]+/video/[^/]+/(?P[0-9]+)/' + + _TESTS = [{ + 'url': 'https://www.rtve.es/infantil/serie/agus-lui-churros-crafts/video/gusano/7048976/', + 'md5': '7da8391b203a2d9cb665f11fae025e72', + 'info_dict': { + 'id': '7048976', + 'ext': 'mp4', + 'title': 'Gusano', + 'thumbnail': r're:https://img2\.rtve\.es/v/.*\.png', + 'duration': 292.86, + 'series': 'Agus & Lui: Churros y Crafts', + }, + 'expected_warnings': ['Failed to download MPD manifest', 'Failed to download m3u8 information'], + }] + + class RTVELiveIE(RTVEALaCartaIE): # XXX: Do not subclass from concrete IE IE_NAME = 'rtve.es:live' IE_DESC = 'RTVE.es live streams'