1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-09 05:37:09 +01:00

Make lang code optional and add a only_matching test

This commit is contained in:
Nasir 2021-05-04 14:35:53 -07:00
parent b91377b6d7
commit bc85e70db0

View File

@ -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<id>[^/?#&]+)'
_VALID_URL = r'https?://(?:www\.)?funimation(?:\.com|now\.uk)/(?:[^/]+/)?shows/(?P<id>[^/?#&]+)'
_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):