ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.19k stars 10.02k forks source link

Soundcloud Go Track Fetching #9272

Open CoelacanthsKill opened 8 years ago

CoelacanthsKill commented 8 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.04.19. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

Add support for logging into soundcloud, and having the ability to fetch full length Soundcloud Go tracks.

yan12125 commented 7 years ago

Is there an example URL?

CoelacanthsKill commented 7 years ago

https://soundcloud.com/herbalpert/jump-street

You must have SoundcloudGo in order to listen to the entire song.

yan12125 commented 7 years ago

This track is not available in Taiwan

Which countries does it require?

CoelacanthsKill commented 7 years ago

It works in the USA, not sure about other countries.

VFUC commented 6 years ago

SoundCloud now requires logging in via OAuth2, so that's a bit tricky to implement without registering an app and implementing a redirect flow. You can however just log in with a browser, read the OAuth-Token from the cookies and pass it to youtube-dl. SoundCloud will then provide the full-length tracks instead of only the preview when fetching, the rest works seamlessly 🙂 The cookie is called oauth_token and an example call would be youtube-dl --add-header 'Authorization':'OAuth 2-123456-123456789-aaa...' https://soundcloud.com/artist/track

Cheers!

josephecombs commented 5 years ago

@VFUC 's solution confirmed as working on 5/4/19. I did need to update to get it to work.

hussong commented 5 years ago

Can confirm as well that @VFUC's above solution is working as of 2019-05-14 with youtube-dl version 2019.05.11.

bersbersbers commented 4 years ago

Had to use

youtube-dl --add-header "Authorization:OAuth 2-..." https://soundcloud.com/artist/track

(note quotation marks) on Windows 10. Working fine otherwise on 2020.06.16.1.

synthesizerpatel commented 4 months ago

Still works in 2024 ❤️

dirkf commented 4 months ago

The extractor should look for this cookie and set it in the auth header or else raise_login_required(). We can check how yt-dlp handles this and implement or back-port as required.

Does this apply across the site, or is there some way (apart from detecting 401/403) to tell which pages need login?