Allow numbers and upper-case letters in ID

This commit is contained in:
dirkf 2023-07-05 20:51:58 +01:00 committed by GitHub
parent 2804216e81
commit 4232427a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,8 @@ from .common import InfoExtractor
class MegaCartoonsIE(InfoExtractor): class MegaCartoonsIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?megacartoons\.net/(?P<id>[a-z-]+)/' _VALID_URL = r'https?://(?:www\.)?megacartoons\.net/(?P<id>[a-zA-Z\d-]+)/'
_TEST = { _TESTS = [{
'url': 'https://www.megacartoons.net/help-wanted/', 'url': 'https://www.megacartoons.net/help-wanted/',
'md5': '4ba9be574f9a17abe0c074e2f955fded', 'md5': '4ba9be574f9a17abe0c074e2f955fded',
'info_dict': { 'info_dict': {
@ -31,7 +31,13 @@ class MegaCartoonsIE(InfoExtractor):
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
'description': 'md5:2c909daa6c6cb16b2d4d791dd1a31632' 'description': 'md5:2c909daa6c6cb16b2d4d791dd1a31632'
} }
} }, {
'url': 'https://www.megacartoons.net/1000-years-of-courage/',
'only_matching': True,
}, {
'url': 'https://www.megacartoons.net/911-2/',
'only_matching': True,
}]
# adapted from common.py pending yt-dlp back-port # adapted from common.py pending yt-dlp back-port
def _search_json_ld(self, html, video_id, expected_type=None, **kwargs): def _search_json_ld(self, html, video_id, expected_type=None, **kwargs):