All Projects → masterT → Bandcamp Scraper

masterT / Bandcamp Scraper

Licence: mit
A scraper for https://bandcamp.com

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bandcamp Scraper

Ex gram
Telegram Bot API low level API and framework
Stars: ✭ 103 (-24.82%)
Mutual labels:  api, hacktoberfest
Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-17.52%)
Mutual labels:  api, hacktoberfest
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+30400.73%)
Mutual labels:  api, hacktoberfest
Tutorialdb
A search 🔎 engine for programming/dev tutorials, See it in action 👉
Stars: ✭ 93 (-32.12%)
Mutual labels:  api, hacktoberfest
Water Monitoring System
Water Monitoring System is an IOT based Liquid Level Monitoring system that has mechanisms to keep the user alerted in case of liquid overflow or when tank depletes.
Stars: ✭ 122 (-10.95%)
Mutual labels:  api, hacktoberfest
Finmind
Open Data, more than 50 financial data. 提供超過 50 個金融資料(台股為主),每天更新 https://finmind.github.io/
Stars: ✭ 1,357 (+890.51%)
Mutual labels:  api, hacktoberfest
Google Play Scraper
Node.js scraper to get data from Google Play
Stars: ✭ 1,606 (+1072.26%)
Mutual labels:  api, scraper
Pymarketcap
Python3 API wrapper and web scraper for https://coinmarketcap.com
Stars: ✭ 73 (-46.72%)
Mutual labels:  api, scraper
Alltomp3
Node module to download and convert in MP3 with tags an online video
Stars: ✭ 120 (-12.41%)
Mutual labels:  api, album
Docs
API Platform documentation
Stars: ✭ 119 (-13.14%)
Mutual labels:  api, hacktoberfest
Pypistats
Command-line interface to PyPI Stats API to get download stats for Python packages
Stars: ✭ 86 (-37.23%)
Mutual labels:  api, hacktoberfest
Amplitude Android
Native Android SDK for Amplitude
Stars: ✭ 129 (-5.84%)
Mutual labels:  product, hacktoberfest
Core
Open source Dota 2 data platform
Stars: ✭ 1,266 (+824.09%)
Mutual labels:  api, hacktoberfest
Swagger Combine
Combines multiple Swagger schemas into one dereferenced schema.
Stars: ✭ 102 (-25.55%)
Mutual labels:  api, hacktoberfest
Libgui
Buttons & Co
Stars: ✭ 78 (-43.07%)
Mutual labels:  api, hacktoberfest
Neovim
Vim-fork focused on extensibility and usability
Stars: ✭ 49,389 (+35950.36%)
Mutual labels:  api, hacktoberfest
Wise Old Man
The Open Source Old School Runescape progress tracker.
Stars: ✭ 68 (-50.36%)
Mutual labels:  api, hacktoberfest
Church Calendar Api
API providing Roman Catholic church calendar data for your apps
Stars: ✭ 72 (-47.45%)
Mutual labels:  api, hacktoberfest
Python Gitlab
Python wrapper for the GitLab API
Stars: ✭ 1,679 (+1125.55%)
Mutual labels:  api, hacktoberfest
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-11.68%)
Mutual labels:  api, hacktoberfest

bandcamp-scraper

npm version Test Test daily JavaScript Style Guide

Bandcamp Logo

A scraper for https://bandcamp.com

The scraper allows you to:

  • search artist, album, track, fan, label
  • get album urls from an artist url
  • get album info from an album url
  • get album products from an album url
  • get artist info from an artist url

Why ?

Because Bandcamp has shut down their public API and don't plan to reopen it.

https://bandcamp.com/developer

Installation

npm i --save bandcamp-scraper

Usage

search(params, callback)

Search any resources that match the given params.query for the current params.page.

  • params Object - query String - page Integer (default 1)
  • callback Function(error, searchResults)

Search Results

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.

Example

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)
  }
})

View example with output.

getAlbumsWithTag(params, callback)

Search for albums with the tag params.tag for the current params.page.

  • params Object - tag String - page Integer (default 1)
  • callback Function(error, tagResults)

Tag Results

An array of album information. Matches the tag-result JSON schema.

Example

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)
  }
})

View example with output.

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.

  • artistUrl String
  • callback Function(error, albumUrls)

Example

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)
  }
})

View example with output.

getAlbumProducts(albumUrl, callback)

Retrieves all the album's products from its URL.

  • albumUrl String
  • callback Function(error, albumProducts)

Album Products

An array of album products that matches the album-product JSON schema.

Example

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)
  }
})

View example with output.

getAlbumInfo(albumUrl, callback)

Retrieves the album's info from its URL.

  • albumUrl String
  • callback Function(error, albumInfo)

Album Info

An Object that represents the album's info. It matches the album-info JSON schema.

Example

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)
  }
})

View example with output.

getArtistUrls(labelUrl, callback)

Retrieves an array of artist URLs from a label's URL for further scraping.

  • labelUrl String
  • callback Function(error, albumInfo)

Example

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)
  }
})

View example with output.

getArtistInfo(artistUrl, callback)

Retrieves the artist's info from its URL.

  • artistUrl String
  • callback Function(error, artistInfo)

Artist Info

An Object that represents the artist's info. It matches the artist-info JSON schema.

Example

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)
  }
})

View example with output.

Test

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

Contributing

Contribution is welcome! Open an issue first.

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].