Skip to content

Return license information of albums and tracks #34

Description

@abetusk

I do not see any license information returned by getAlbumInfo and it would be nice to provide that information.

For example, running:

var bandcamp = require("bandcamp-scraper");
var albumUrl='https://bit-rot.bandcamp.com/album/twisted-pair';
console.log(">>>", albumUrl);
bandcamp.getAlbumInfo(albumUrl, function(error, albumInfo) {
  if (error) { console.log(error); }
  else { console.log(albumInfo); }
});

returns:

>>> https://bit-rot.bandcamp.com/album/twisted-pair
{ artist: 'bit rot',
  title: 'Twisted Pair',
  imageUrl: 'https://f4.bcbits.com/img/a1538849378_2.jpg',
  tracks:
   [ { name: 'Uplink',
       url: 'https://bit-rot.bandcamp.com/track/uplink',
       duration: '06:19' },
     { name: 'Driver',
       url: 'https://bit-rot.bandcamp.com/track/driver',
       duration: '04:34' },
     { name: 'Psychadelic Death Trip',
       url: 'https://bit-rot.bandcamp.com/track/psychadelic-death-trip',
       duration: '06:18' },
     { name: 'POST',
       url: 'https://bit-rot.bandcamp.com/track/post',
       duration: '02:22' } ],
  raw:
   { current:
      { purchase_url: null,
        release_date: '24 Jan 2018 00:00:00 GMT',
        new_desc_format: 1,
        selling_band_id: 1888597831,
        set_price: 7,
        killed: null,
        purchase_title: null,
        minimum_price_nonzero: 7,
        title: 'Twisted Pair',
        new_date: '24 Jan 2018 02:32:19 GMT',
        featured_track_id: 286527331,
        minimum_price: 0,
        is_set_price: null,
        upc: null,
        credits: 'https://celebornidril.bandcamp.com/',
        private: null,
        art_id: 1538849378,
        require_email: null,
        id: 1214178877,
        band_id: 1888597831,
        about: 'Collaborations between bit rot & Celebornidril',
        require_email_0: null,
        download_pref: 2,
        publish_date: '24 Jan 2018 03:19:17 GMT',
        audit: 0,
        type: 'album',
        download_desc_id: null,
        auto_repriced: null,
        artist: null,
        mod_date: '17 Sep 2018 17:50:13 GMT' },
     is_preorder: null,
     album_is_preorder: null,
     album_release_date: '24 Jan 2018 00:00:00 GMT',
     preorder_count: null,
     hasAudio: true,
     art_id: 1538849378,
     trackinfo: [ [Object], [Object], [Object], [Object] ],
     playing_from: 'album page',
     featured_track_id: 286527331,
     initial_track_num: null,
     packages: null,
     url: 'http://bit-rot.bandcamp.com/album/twisted-pair',
     defaultPrice: 7,
     freeDownloadPage:
      'https://bandcamp.com/download?id=1214178877&ts=1550427274.1409455241&tsig=2e8c8dec6b5ffd439741a5698ac690d4&type=album',
     FREE: 1,
     PAID: 2,
     artist: 'bit rot',
     item_type: 'album',
     id: 1214178877,
     last_subscription_item: null,
     has_discounts: null,
     is_bonus: null,
     play_cap_data: null,
     client_id_sig: null,
     is_purchased: null,
     items_purchased: null,
     is_private_stream: null,
     is_band_member: null,
     licensed_version_ids: null,
     package_associated_license_id: null,
     tralbum_collect_info: { show_collect: true, show_wishlist_tooltip: false } },
  url: 'https://bit-rot.bandcamp.com/album/twisted-pair' }

The album is put under a CC-BY-SA license but I don't see that reflected in the returned data. I do see a licensed_version_ids and package_associated_license_id but I'm not sure if that's relevant to the license the album is put under and they're both null in this case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions