Skip to content

Commit

Permalink
Reverted RTVEInfantil deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Florentin Le Moal committed Oct 13, 2024
1 parent aec3c0d commit 2eb268c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions yt_dlp/extractor/_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,7 @@
from .rtve import (
RTVEALaCartaIE,
RTVEAudioIE,
RTVEInfantilIE,
RTVELiveIE,
RTVETelevisionIE,
)
Expand Down
33 changes: 20 additions & 13 deletions yt_dlp/extractor/rtve.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class RTVEALaCartaIE(InfoExtractor):
_VALID_URL = [
r'https?://(?:www\.)?rtve\.es/(m/)?(alacarta/videos|filmoteca)/[^/]+/[^/]+/(?P<id>\d+)',
r'https?://(?:www\.)?rtve\.es/(m/)?play/videos/[^/]+/[^/]+/(?P<id>\d+)',
r'https?://(?:www\.)?rtve\.es/infantil/serie/[^/]+/video/[^/]+/(?P<id>[0-9]+)/',
]

_TESTS = [{
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -300,6 +287,26 @@ def _real_extract(self, url):
}


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<id>[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'
Expand Down

0 comments on commit 2eb268c

Please sign in to comment.