[extractor/crunchyroll:music] Fix `_VALID_URL` (#7439)

Closes #7419
Authored by: AmanSal1, rdamas

Co-authored-by: Robert Damas <robert.damas@byom.de>
pull/7454/head
Aman Salwan 1 year ago committed by GitHub
parent 91302ed349
commit 5b4b92769a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -490,8 +490,21 @@ class CrunchyrollMusicIE(CrunchyrollBaseIE):
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
https?://(?:www\.)?crunchyroll\.com/ https?://(?:www\.)?crunchyroll\.com/
(?P<lang>(?:\w{2}(?:-\w{2})?/)?) (?P<lang>(?:\w{2}(?:-\w{2})?/)?)
watch/(?P<type>concert|musicvideo)/(?P<id>\w{10})''' watch/(?P<type>concert|musicvideo)/(?P<id>\w+)'''
_TESTS = [{ _TESTS = [{
'url': 'https://www.crunchyroll.com/de/watch/musicvideo/MV5B02C79',
'info_dict': {
'ext': 'mp4',
'id': 'MV5B02C79',
'display_id': 'egaono-hana',
'title': 'Egaono Hana',
'track': 'Egaono Hana',
'artist': 'Goose house',
'thumbnail': r're:(?i)^https://www.crunchyroll.com/imgsrv/.*\.jpeg?$',
'genre': ['J-Pop'],
},
'params': {'skip_download': 'm3u8'},
}, {
'url': 'https://www.crunchyroll.com/watch/musicvideo/MV88BB7F2C', 'url': 'https://www.crunchyroll.com/watch/musicvideo/MV88BB7F2C',
'info_dict': { 'info_dict': {
'ext': 'mp4', 'ext': 'mp4',
@ -519,11 +532,14 @@ class CrunchyrollMusicIE(CrunchyrollBaseIE):
}, },
'params': {'skip_download': 'm3u8'}, 'params': {'skip_download': 'm3u8'},
}, { }, {
'url': 'https://www.crunchyroll.com/watch/musicvideo/MV88BB7F2C/crossing-field', 'url': 'https://www.crunchyroll.com/de/watch/musicvideo/MV5B02C79/egaono-hana',
'only_matching': True, 'only_matching': True,
}, { }, {
'url': 'https://www.crunchyroll.com/watch/concert/MC2E2AC135/live-is-smile-always-364joker-at-yokohama-arena', 'url': 'https://www.crunchyroll.com/watch/concert/MC2E2AC135/live-is-smile-always-364joker-at-yokohama-arena',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://www.crunchyroll.com/watch/musicvideo/MV88BB7F2C/crossing-field',
'only_matching': True,
}] }]
_API_ENDPOINT = 'music' _API_ENDPOINT = 'music'

Loading…
Cancel
Save