twlite / soundcloud-scraper

☁️ Get basic informations about a song from a SoundCloud URL
https://soundcloud-scraper.js.org
67 stars 16 forks source link

403 Forbidden #27

Open EhsanFox opened 1 year ago

EhsanFox commented 1 year ago

For some reason, calling getSongInfo throws the error

I haven't investigated it, but it either is a problem with the CLIENT_ID (which I don't pass to the class/function)

Or it can be perhaps a moved endpoint or some similar action by Soundcloud.

P.S: fetchStreamURL is set to true (which obviously calls the function fetchSongStreamURL

Error: [Code: 403] Rejected with status code "403"!
    at /workspaces/backend/node_modules/soundcloud-scraper/src/util/Util.js:161:35
twlite commented 1 year ago

Yes, based on the status code, the error seems to be caused by client id being invalid

twlite commented 1 year ago

what does await Util.keygen(true) return?

EhsanFox commented 1 year ago

I've never called it or passed it to the Client, I've just left that empty so the package can generate one, I can try and create one and pass it on to the client as well as log it to see what's the content if you want to.

twlite commented 1 year ago

v6 rewrite initiated https://github.com/skdhg/soundcloud-scraper/pull/28, although I might not be able to complete it in time. Contributions are welcome!