3jackdaws / soundcloud-lib

Soundcloud API wrapper for tracks & playlists that doesn't require API credentials. Asyncio support.
MIT License
94 stars 24 forks source link

Bugfix/find script url #7

Closed alistairmaclean closed 4 years ago

alistairmaclean commented 4 years ago

Fixes 3jackdaws/soundcloud-lib#6

Forgive any misdoing on my behalf, it's my first Github PR.

I'm happy to oblige and amend commits to fit standards expected by the author.

Thanks.

alistairmaclean commented 4 years ago

@3jackdaws Is this of any interest?

3jackdaws commented 4 years ago

Thanks for your contribution! I will merge this as soon as I can pull it and run tests.

alistairmaclean commented 4 years ago

Apologies, I had just assumed tests were unaffected. It appears there are two areas of concern;

Fetching tracks by track ids
When fetching a batch of tracks by track ids, SoundCloud is returning 401 Unauthorized when using the ids querystring on the /tracks resource endpoint. I assume they are trying to crack down our sort of use-case.

What your thoughts on mitigating this with concurrency, requesting every individual track? It's far from ideal, a lot more network overhead, and a lot more requests towards rate limiting.

Docs state rate limiting is against the client_id, so we could fetch a new one when rate limited.

After further investigation, Soundcloud has simply limited the request to 50 ids. So, some concurrency is probably required.

HLS assembly
What's your thoughts on implementing a library to do this? I came across https://github.com/Eyevinn/hls-download

Let me know and thanks again.

alistairmaclean commented 4 years ago

Closed this to open a new PR with further improvements under a 1.5.1 release version.