Code Monkey home page Code Monkey logo

bandcamp-fetch's People

Contributors

patrickkfkan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bandcamp-fetch's Issues

Vulnerability in safe-eval package

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

Getting/setting cookie doesn't work

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!

Track Duration Property Mismatch

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:

const duration = getAdditionalPropertyValue<number>(basic, 'duration_secs');

const p = o.additionalProperty.find((prop) => prop.name === propName);

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.