
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
bandcamp-scraper
Advanced tools
A scraper for https://bandcamp.com
The scraper allows you to:
artist
, album
, track
, fan
, label
Because Bandcamp has shut down their public API and don't plan to reopen it.
https://bandcamp.com/developer
npm i --save bandcamp-scraper
search(params, callback)
Search any resources that match the given params.query
for the current params.page
.
1
)An array of resources that have different properties depending on their type property: artist, album, track, fan, or label.
Every resource matches the search-result JSON schema.
const bandcamp = require('bandcamp-scraper')
const params = {
query: 'Coeur de pirate',
page: 1
}
bandcamp.search(params, function (error, searchResults) {
if (error) {
console.log(error)
} else {
console.log(searchResults)
}
})
getAlbumsWithTag(params, callback)
Search for albums with the tag params.tag
for the current params.page
.
1
)An array of album information. Matches the tag-result JSON schema.
const bandcamp = require('bandcamp-scraper')
const params = {
tag: 'nuwrld',
page: 1
}
bandcamp.getAlbumsWithTag(params, function (error, tagResults) {
if (error) {
console.log(error)
} else {
console.log(tagResults)
}
})
getAlbumUrls(artistUrl, callback)
Retrieve the album URLs from an artist URL.
Please note: for Bandcamp labels you may want to use the getArtistsUrls
function to retrieve the list of signed artists first.
const bandcamp = require('bandcamp-scraper')
const artistUrl = 'http://musique.coeurdepirate.com/'
bandcamp.getAlbumUrls(artistUrl, function (error, albumUrls) {
if (error) {
console.log(error)
} else {
console.log(albumUrls)
}
})
getAlbumProducts(albumUrl, callback)
Retrieves all the album's products from its URL.
An array of album products that matches the album-product JSON schema.
const bandcamp = require('bandcamp-scraper')
const albumUrl = 'http://musique.coeurdepirate.com/album/blonde'
bandcamp.getAlbumProducts(albumUrl, function (error, albumProducts) {
if (error) {
console.log(error)
} else {
console.log(albumProducts)
}
})
getAlbumInfo(albumUrl, callback)
Retrieves the album's info from its URL.
An Object that represents the album's info. It matches the album-info JSON schema.
const bandcamp = require('bandcamp-scraper')
const albumUrl = 'http://musique.coeurdepirate.com/album/blonde'
bandcamp.getAlbumInfo(albumUrl, function (error, albumInfo) {
if (error) {
console.log(error)
} else {
console.log(albumInfo)
}
})
getArtistUrls(labelUrl, callback)
Retrieves an array of artist URLs from a label's URL for further scraping.
const bandcamp = require('bandcamp-scraper')
const labelUrl = 'https://randsrecords.bandcamp.com'
bandcamp.getArtistUrls(labelUrl, function (error, artistsUrls) {
if (error) {
console.log(error)
} else {
console.log(artistsUrls)
}
})
getArtistInfo(artistUrl, callback)
Retrieves the artist's info from its URL.
An Object that represents the artist's info. It matches the artist-info JSON schema.
const bandcamp = require('bandcamp-scraper')
const artistUrl = 'http://musique.coeurdepirate.com'
bandcamp.getArtistInfo(artistUrl, function (error, artistInfo) {
if (error) {
console.log(error)
} else {
console.log(artistInfo)
}
})
getTrackInfo(trackUrl, callback)
Retrieves the track info from its URL.
An Object that represents the track's info. It matches the track-info JSON schema.
const bandcamp = require('bandcamp-scraper')
const trackUrl = 'https://dafnez.bandcamp.com/track/serenade'
bandcamp.getTrackInfo(trackUrl, function (error, trackInfo) {
if (error) {
console.log(error)
} else {
console.log(trackInfo)
}
})
Feature tests are run daily, thanks to GitHub Action schedule actions. This way we know if the scraper is ever broken.
Run the test:
npm test
Contribution is welcome! Open an issue first.
MIT.
FAQs
A scraper for https://bandcamp.com
The npm package bandcamp-scraper receives a total of 38 weekly downloads. As such, bandcamp-scraper popularity was classified as not popular.
We found that bandcamp-scraper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.