diff options
author | Sergey M․ <dstftw@gmail.com> | 2020-11-21 23:35:01 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2020-11-21 23:35:32 +0700 |
commit | 049f2242480fd481ddb6a88c5a9d7f360f890d7c (patch) | |
tree | 2e6744b4fcb830d11a9f8f90c9e64771840f0d66 | |
parent | 0ada1b90b801e5d6ce713a25eccd7de21e7e4b6f (diff) |
[svtplay] Add support for svt.se/barnkanalen (closes #24817)
-rw-r--r-- | youtube_dl/extractor/svt.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/youtube_dl/extractor/svt.py b/youtube_dl/extractor/svt.py index 9dd91c69a..17bd4acdc 100644 --- a/youtube_dl/extractor/svt.py +++ b/youtube_dl/extractor/svt.py @@ -140,7 +140,11 @@ class SVTPlayIE(SVTPlayBaseIE): IE_DESC = 'SVT Play and Öppet arkiv' _VALID_URL = r'''(?x) (?: - svt:(?P<svt_id>[^/?#&]+)| + (?: + svt:| + https?://(?:www\.)?svt\.se/barnkanalen/barnplay/[^/]+/ + ) + (?P<svt_id>[^/?#&]+)| https?://(?:www\.)?(?:svtplay|oppetarkiv)\.se/(?:video|klipp|kanaler)/(?P<id>[^/?#&]+) ) ''' @@ -185,6 +189,12 @@ class SVTPlayIE(SVTPlayBaseIE): }, { 'url': 'svt:14278044', 'only_matching': True, + }, { + 'url': 'https://www.svt.se/barnkanalen/barnplay/kar/eWv5MLX/', + 'only_matching': True, + }, { + 'url': 'svt:eWv5MLX', + 'only_matching': True, }] def _adjust_title(self, info): @@ -376,7 +386,7 @@ class SVTPageIE(InfoExtractor): @classmethod def suitable(cls, url): - return False if SVTIE.suitable(url) else super(SVTPageIE, cls).suitable(url) + return False if SVTIE.suitable(url) or SVTPlayIE.suitable(url) else super(SVTPageIE, cls).suitable(url) def _real_extract(self, url): path, display_id = re.match(self._VALID_URL, url).groups() |