Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bandcamp-fetch

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bandcamp-fetch - npm Package Compare versions

Comparing version 0.1.0-a-20210213.2 to 0.1.0-a-20210213.3

27

lib/parser.js

@@ -161,27 +161,18 @@ const cheerio = require('cheerio');

basic.albumRelease.forEach( release => {
album.releases.push({
const releaseItem = {
name: release.name,
url: release.url,
url: null,
format: release.musicReleaseFormat,
description: release.description || '',
imageUrl: utils.reformatImageUrl(release.image, opts.albumImageFormat)
});
}
if (release.url) {
releaseItem.url = !utils.isAbsoluteUrl(release.url) ? utils.getUrl(release.url, album.url) : release.url;
}
album.releases.push(releaseItem);
});
}
if (Array.isArray(basic.track.itemListElement)) {
const _getStreamUrl = (url) => {
let file = null;
if (Array.isArray(extra.trackinfo)) {
extra.trackinfo.every( track => {
if (url.endsWith(track.title_link)) {
file = track.file && track.file['mp3-128'] ? track.file['mp3-128'] : null;
return false;
}
return true;
});
}
return file;
}
basic.track.itemListElement.forEach( track => {
let trackUrl = track.item.url;
let trackUrl = track.item['@id'];
if (!utils.isAbsoluteUrl(trackUrl)) {

@@ -235,3 +226,3 @@ trackUrl = utils.getUrl(trackUrl, album.url);

name: basic.name,
url: basic.url,
url: basic['@id'],
imageUrl: opts.imageBaseUrl + '/img/a' + extra.art_id + '_' + opts.albumImageFormat.id + '.jpg',

@@ -238,0 +229,0 @@ releaseDate: extra.current.release_date,

{
"name": "bandcamp-fetch",
"version": "0.1.0a-20210213.2",
"version": "0.1.0a-20210213.3",
"description": "JS library for scraping Bandcamp content",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc