From bc85e70db0cd57fab723a9ee45f6bdfbbf540b0f Mon Sep 17 00:00:00 2001 From: Nasir Date: Tue, 4 May 2021 14:35:53 -0700 Subject: [PATCH] Make lang code optional and add a only_matching test --- youtube_dl/extractor/funimation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.py index 38bb4cce4..b5c74e2e8 100644 --- a/youtube_dl/extractor/funimation.py +++ b/youtube_dl/extractor/funimation.py @@ -157,10 +157,10 @@ class FunimationIE(InfoExtractor): class FunimationShowPlaylistIE(FunimationIE): IE_NAME = 'funimation:playlist' - _VALID_URL = r'https?://(?:www\.)?funimation(?:\.com|now\.uk)/[a-z]{2}/shows/(?P[^/?#&]+)' + _VALID_URL = r'https?://(?:www\.)?funimation(?:\.com|now\.uk)/(?:[^/]+/)?shows/(?P[^/?#&]+)' _TESTS = [{ - 'url': 'https://www.funimation.com/en/shows/hacksign/', + 'url': 'https://www.funimation.com/shows/hacksign/', 'info_dict': { 'id': 90646, 'title': '.hack//SIGN' @@ -169,6 +169,10 @@ class FunimationShowPlaylistIE(FunimationIE): 'params': { 'skip_download': True, }, + }, { + # with lang code + 'url': 'https://www.funimation.com/en/shows/hacksign/', + 'only_matching': True, }] def _real_extract(self, url):