mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[ie/HearThisAt] Improve _VALID_URL
(#9949)
Closes #9755 Authored by: bohwaz, seproDev Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
This commit is contained in:
parent
0dd53faeca
commit
5bbfdb7c99
1 changed files with 39 additions and 5 deletions
|
@ -7,13 +7,14 @@
|
||||||
|
|
||||||
|
|
||||||
class HearThisAtIE(InfoExtractor):
|
class HearThisAtIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?hearthis\.at/(?P<artist>[^/]+)/(?P<title>[A-Za-z0-9\-]+)/?$'
|
_VALID_URL = r'https?://(?:www\.)?hearthis\.at/(?P<artist>[^/?#]+)/(?P<title>[\w.-]+)'
|
||||||
_PLAYLIST_URL = 'https://hearthis.at/playlist.php'
|
_PLAYLIST_URL = 'https://hearthis.at/playlist.php'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://hearthis.at/moofi/dr-kreep',
|
'url': 'https://hearthis.at/moofi/dr-kreep',
|
||||||
'md5': 'ab6ec33c8fed6556029337c7885eb4e0',
|
'md5': 'ab6ec33c8fed6556029337c7885eb4e0',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '150939',
|
'id': '150939',
|
||||||
|
'display_id': 'moofi - dr-kreep',
|
||||||
'ext': 'wav',
|
'ext': 'wav',
|
||||||
'title': 'Moofi - Dr. Kreep',
|
'title': 'Moofi - Dr. Kreep',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
|
@ -21,15 +22,16 @@ class HearThisAtIE(InfoExtractor):
|
||||||
'description': 'md5:1adb0667b01499f9d27e97ddfd53852a',
|
'description': 'md5:1adb0667b01499f9d27e97ddfd53852a',
|
||||||
'upload_date': '20150118',
|
'upload_date': '20150118',
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'duration': 71,
|
'duration': 70,
|
||||||
'genre': 'Experimental',
|
'genres': ['Experimental'],
|
||||||
}
|
},
|
||||||
}, {
|
}, {
|
||||||
# 'download' link redirects to the original webpage
|
# 'download' link redirects to the original webpage
|
||||||
'url': 'https://hearthis.at/twitchsf/dj-jim-hopkins-totally-bitchin-80s-dance-mix/',
|
'url': 'https://hearthis.at/twitchsf/dj-jim-hopkins-totally-bitchin-80s-dance-mix/',
|
||||||
'md5': '5980ceb7c461605d30f1f039df160c6e',
|
'md5': '5980ceb7c461605d30f1f039df160c6e',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '811296',
|
'id': '811296',
|
||||||
|
'display_id': 'twitchsf - dj-jim-hopkins-totally-bitchin-80s-dance-mix',
|
||||||
'ext': 'mp3',
|
'ext': 'mp3',
|
||||||
'title': 'TwitchSF - DJ Jim Hopkins - Totally Bitchin\' 80\'s Dance Mix!',
|
'title': 'TwitchSF - DJ Jim Hopkins - Totally Bitchin\' 80\'s Dance Mix!',
|
||||||
'description': 'md5:ef26815ca8f483272a87b137ff175be2',
|
'description': 'md5:ef26815ca8f483272a87b137ff175be2',
|
||||||
|
@ -38,7 +40,39 @@ class HearThisAtIE(InfoExtractor):
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'duration': 4360,
|
'duration': 4360,
|
||||||
'genre': 'Dance',
|
'genres': ['Dance'],
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://hearthis.at/tindalos/0001-tindalos-gnrique/eQd/',
|
||||||
|
'md5': 'cd08e51911f147f6da2d9678905b0bd9',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '2685222',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'duration': 86,
|
||||||
|
'view_count': int,
|
||||||
|
'timestamp': 1545471670,
|
||||||
|
'display_id': 'tindalos - 0001-tindalos-gnrique',
|
||||||
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
|
'genres': ['Other'],
|
||||||
|
'title': 'Tindalos - Tindalos - générique n°1',
|
||||||
|
'description': '',
|
||||||
|
'upload_date': '20181222',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://hearthis.at/sithi2/biochip-c-classics-set-wolle-xdp-tresor.core-special-tresor-globus-berlin-13.07.20011/',
|
||||||
|
'md5': 'b45ac60f0c8111eef6ddc10ec232e312',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '7145959',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'description': 'md5:d7ae36a453d78903f6b7ed6eb2fce1f2',
|
||||||
|
'duration': 8986,
|
||||||
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
|
'title': 'md5:62669ce5b1b67f45c6f846033f37d3b9',
|
||||||
|
'timestamp': 1588699409,
|
||||||
|
'display_id': 'sithi2 - biochip-c-classics-set-wolle-xdp-tresor.core-special-tresor-globus-berlin-13.07.20011',
|
||||||
|
'view_count': int,
|
||||||
|
'upload_date': '20200505',
|
||||||
|
'genres': ['Other'],
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue