patrickkfkan / bandcamp-fetch Goto Github PK
View Code? Open in Web Editor NEWLibrary for scraping Bandcamp content.
Library for scraping Bandcamp content.
Hi when I go to install your package npm notifies of critical security vulnerabilities from safe-eval
package. Checking that repo it seems the code is no longer being maintained. Can you remove this dependency?
safe-eval *
Severity: critical
Sandbox Breakout / Arbitrary Code Execution in safe-eval - https://github.com/advisories/GHSA-9pcf-h8q9-63f6
Sandbox Breakout / Arbitrary Code Execution in safe-eval - https://github.com/advisories/GHSA-hrpq-r399-whgw
safe-eval vulnerable to Prototype Pollution - https://github.com/advisories/GHSA-33vh-7x8q-mg35
I've tried the method as described here to get the session cookie. At the moment I don't get HQ urls back.
I've tried both Chrome & Firefox, made sure I was logged out before starting.
I also tried different albums because I thought some just might not have the HQ property at all.
Any Idea?
PS: the session cookie value looks different in Chrome vs Firefox, both none of both work for me.
Cheers!
I've found that when fetching Bandcamp Track information using BandcampFetch().track.getInfo()
, track duration information is not returned. Setting includeRawData: true
allows us to see that the duration property is not called duration_secs
but rather duration
, and can be found under raw.basic.duration
. This duration property is not a number representing the duration in seconds but rather a string that tells how long the song is in hours, minutes, and seconds: "P00H05M19S"
Code responsible for parsing the duration from TrackInfo:
bandcamp-fetch/src/lib/utils/Parse.ts
Line 89 in 7658926
I believe there may have been a change at some point in the Bandcamp API that is causing this issue. Or possibly that some tracks return the usual duration_secs
info, but other tracks return this weird duration
string instead.
I have prepared a RunKit playground for you if you'd like to run some sample code that showcases this odd behavior. Also included is a workaround method that I've written to fetch the duration for the time being.
https://runkit.com/bonfire/bandcamp-fetch-duration
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.