1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-16 09:28:28 +00:00

BandcampIE

This commit is contained in:
doe1080 2025-07-17 16:49:17 +09:00
parent 0da091f57e
commit c436f36da5
2 changed files with 21 additions and 26 deletions

View File

@ -35,14 +35,12 @@ class BandcampIE(InfoExtractor):
'duration': 9.8485, 'duration': 9.8485,
'uploader': 'youtube-dl "\'/\\ä↭', 'uploader': 'youtube-dl "\'/\\ä↭',
'upload_date': '20121129', 'upload_date': '20121129',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1354224127, 'timestamp': 1354224127,
'track': 'youtube-dl "\'/\\ä↭ - youtube-dl test song "\'/\\ä↭', 'track': 'youtube-dl "\'/\\ä↭ - youtube-dl test song "\'/\\ä↭',
'album_artist': 'youtube-dl "\'/\\ä↭',
'track_id': '1812978515', 'track_id': '1812978515',
'artist': 'youtube-dl "\'/\\ä↭',
'uploader_url': 'https://youtube-dl.bandcamp.com', 'uploader_url': 'https://youtube-dl.bandcamp.com',
'uploader_id': 'youtube-dl', 'uploader_id': 'youtube-dl',
'thumbnail': 'https://f4.bcbits.com/img/a3216802731_5.jpg',
'artists': ['youtube-dl "\'/\\ä↭'], 'artists': ['youtube-dl "\'/\\ä↭'],
'album_artists': ['youtube-dl "\'/\\ä↭'], 'album_artists': ['youtube-dl "\'/\\ä↭'],
}, },
@ -53,10 +51,11 @@ class BandcampIE(InfoExtractor):
'info_dict': { 'info_dict': {
'id': '2650410135', 'id': '2650410135',
'ext': 'm4a', 'ext': 'm4a',
'acodec': r're:[fa]lac',
'title': 'Ben Prunty - Lanius (Battle)', 'title': 'Ben Prunty - Lanius (Battle)',
'thumbnail': r're:^https?://.*\.jpg$', 'album_artists': ['Ben Prunty'],
'artists': ['Ben Prunty'],
'uploader': 'Ben Prunty', 'uploader': 'Ben Prunty',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1396508491, 'timestamp': 1396508491,
'upload_date': '20140403', 'upload_date': '20140403',
'release_timestamp': 1396483200, 'release_timestamp': 1396483200,
@ -65,8 +64,6 @@ class BandcampIE(InfoExtractor):
'track': 'Lanius (Battle)', 'track': 'Lanius (Battle)',
'track_number': 1, 'track_number': 1,
'track_id': '2650410135', 'track_id': '2650410135',
'artist': 'Ben Prunty',
'album_artist': 'Ben Prunty',
'album': 'FTL: Advanced Edition Soundtrack', 'album': 'FTL: Advanced Edition Soundtrack',
'uploader_url': 'https://benprunty.bandcamp.com', 'uploader_url': 'https://benprunty.bandcamp.com',
'uploader_id': 'benprunty', 'uploader_id': 'benprunty',
@ -79,8 +76,10 @@ class BandcampIE(InfoExtractor):
'id': '2584466013', 'id': '2584466013',
'ext': 'mp3', 'ext': 'mp3',
'title': 'Mastodon - Hail to Fire', 'title': 'Mastodon - Hail to Fire',
'thumbnail': r're:^https?://.*\.jpg$', 'album_artists': ['Mastodon'],
'artists': ['Mastodon'],
'uploader': 'Mastodon', 'uploader': 'Mastodon',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1322005399, 'timestamp': 1322005399,
'upload_date': '20111122', 'upload_date': '20111122',
'release_timestamp': 1076112000, 'release_timestamp': 1076112000,
@ -89,8 +88,6 @@ class BandcampIE(InfoExtractor):
'track': 'Hail to Fire', 'track': 'Hail to Fire',
'track_number': 5, 'track_number': 5,
'track_id': '2584466013', 'track_id': '2584466013',
'artist': 'Mastodon',
'album_artist': 'Mastodon',
'album': 'Call of the Mastodon', 'album': 'Call of the Mastodon',
'uploader_url': 'https://relapsealumni.bandcamp.com', 'uploader_url': 'https://relapsealumni.bandcamp.com',
'uploader_id': 'relapsealumni', 'uploader_id': 'relapsealumni',
@ -103,8 +100,10 @@ class BandcampIE(InfoExtractor):
'id': '1978174799', 'id': '1978174799',
'ext': 'mp3', 'ext': 'mp3',
'title': 'submerse - submerse - Safehouse', 'title': 'submerse - submerse - Safehouse',
'thumbnail': r're:^https?://.*\.jpg$', 'album_artists': ['Diskotopia'],
'artists': ['submerse'],
'uploader': 'submerse', 'uploader': 'submerse',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1480779297, 'timestamp': 1480779297,
'upload_date': '20161203', 'upload_date': '20161203',
'release_timestamp': 1481068800, 'release_timestamp': 1481068800,
@ -113,13 +112,20 @@ class BandcampIE(InfoExtractor):
'track': 'submerse - Safehouse', 'track': 'submerse - Safehouse',
'track_number': 3, 'track_number': 3,
'track_id': '1978174799', 'track_id': '1978174799',
'artist': 'submerse',
'album_artist': 'Diskotopia',
'album': 'DSK F/W 2016-2017 Free Compilation', 'album': 'DSK F/W 2016-2017 Free Compilation',
'uploader_url': 'https://diskotopia.bandcamp.com', 'uploader_url': 'https://diskotopia.bandcamp.com',
'uploader_id': 'diskotopia', 'uploader_id': 'diskotopia',
}, },
}] }]
_WEBPAGE_TESTS = [{
'url': 'http://bronyrock.com/track/the-pony-mash',
'info_dict': {
'id': '3235767654',
'ext': 'mp3',
'title': 'The Pony Mash',
},
'skip': 'Invalid URL',
}]
def _extract_data_attr(self, webpage, video_id, attr='tralbum', fatal=True): def _extract_data_attr(self, webpage, video_id, attr='tralbum', fatal=True):
return self._parse_json(self._html_search_regex( return self._parse_json(self._html_search_regex(
@ -268,10 +274,10 @@ class BandcampAlbumIE(BandcampIE): # XXX: Do not subclass from concrete IE
'id': '1353101989', 'id': '1353101989',
'ext': 'mp3', 'ext': 'mp3',
'title': 'Blazo - Intro', 'title': 'Blazo - Intro',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1311756226, 'timestamp': 1311756226,
'upload_date': '20110727', 'upload_date': '20110727',
'uploader': 'Blazo', 'uploader': 'Blazo',
'thumbnail': 'https://f4.bcbits.com/img/a1721150828_5.jpg',
'album_artists': ['Blazo'], 'album_artists': ['Blazo'],
'uploader_url': 'https://blazo.bandcamp.com', 'uploader_url': 'https://blazo.bandcamp.com',
'release_date': '20110727', 'release_date': '20110727',
@ -291,6 +297,7 @@ class BandcampAlbumIE(BandcampIE): # XXX: Do not subclass from concrete IE
'id': '38097443', 'id': '38097443',
'ext': 'mp3', 'ext': 'mp3',
'title': 'Blazo - Kero One - Keep It Alive (Blazo remix)', 'title': 'Blazo - Kero One - Keep It Alive (Blazo remix)',
'thumbnail': r're:https?://f4\.bcbits\.com/img/.+\.jpg',
'timestamp': 1311757238, 'timestamp': 1311757238,
'upload_date': '20110727', 'upload_date': '20110727',
'uploader': 'Blazo', 'uploader': 'Blazo',
@ -304,7 +311,6 @@ class BandcampAlbumIE(BandcampIE): # XXX: Do not subclass from concrete IE
'uploader_id': 'blazo', 'uploader_id': 'blazo',
'album_artists': ['Blazo'], 'album_artists': ['Blazo'],
'artists': ['Blazo'], 'artists': ['Blazo'],
'thumbnail': 'https://f4.bcbits.com/img/a1721150828_5.jpg',
'release_timestamp': 1311724800.0, 'release_timestamp': 1311724800.0,
}, },
}, },

View File

@ -633,17 +633,6 @@ class GenericIE(InfoExtractor):
}, },
'playlist_count': 4, 'playlist_count': 4,
'skip': 'IE fix required; embed detection', 'skip': 'IE fix required; embed detection',
}, {
# 🔍50
# BandcampIE
'url': 'http://bronyrock.com/track/the-pony-mash',
'info_dict': {
'id': '3235767654',
'ext': 'mp3',
'title': 'The Pony Mash',
'uploader': 'M_Pallante',
},
'skip': 'Invalid URL',
}, { }, {
# 🔍62 # 🔍62
# FacebookIE; iframe embed # FacebookIE; iframe embed