Giter VIP home page Giter VIP logo

scdl's Introduction

gopher

Scdl is the fastest SoundCloud music downloading CLI tool. Scdl utilizes a go routine pool ensuring multiple thread safe and fast downloads from SoundCloud within seconds. There are extended features such as search (no URL needed) recursively downloading all songs from a given playlist and more!



Download

Table of Contents

๐Ÿš€ Installation

Brew

# tap
brew tap imthaghost/scdl
# install tool
brew install scdl

Manual

# go get :)
go get https://github.com/imthaghost/scdl
# change to project directory using your GOPATH
cd $GOPATH/src/github.com/imthaghost/scdl/cmd/scdl
# build and install application
go install

Binary

Download Here

Usage

-h, --help - Help screen and usage

-s, --search - Option for searching for songs

Examples

Base Command

# command + SounCloud URL
scdl https://soundcloud.com/polo-g/polo-g-feat-juice-wrld-flex

Todo

Short term

  • Cobra command line interface
  • Download audio file from Soundcloud URL
  • Goroutine pool for downloading m3u8 file
  • Installation via Brew
  • Mp3 file contains image cover
  • Download a song through search functionality
  • 80-100% test coverage
  • Update tool for better performance
  • Proxy flag
  • Format flag

Long term

  • Search results
  • Download all songs from a given playlist
  • Download all songs from a given album

๐Ÿ“ License

By contributing, you agree that your contributions will be licensed under its MIT License.

In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.

scdl's People

Contributors

imthaghost avatar nourserry avatar tylerholland12 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  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

scdl's Issues

Please support high quality song download

Either by finding a smart hack to access it even without being connected to a subscriber account, or by being connected to a subscriber account (I don't mind, I have one). I'm just so effing sick of the android soundcloud app being such garbage. I'd really love to be able to retrieve all my liked tracks offline once and for all.
Thanks in advance for your consideration!
Cheers

SoundCloud endpoint Update

I believe SoundCloud has updated their site which is causing SCDL to error when trying to find the .m3u8 files.

For example:

All Girls Are The Same
[-] Error unmarshalling API response: unexpected end of JSON input
[-] Parse m3u8 file failed: Get "": unsupported protocol scheme ""
[+] Will save to All Girls Are The Same.mp3

I'm too lazy to look for the endpoint if someone else wants to that would be great :)

Downloading private tracks possible ?

I can't download a track from a private playlist. Will it be technically possible in the future or soundcloud by design prevent it ?
I can stream it without being logged in my sc account.

Error downloading track

I am seeing the following error when trying to download a track:

2023/05/30 18:23:30 Get "": unsupported protocol scheme ""

To get the error message above, I opened a terminal and ran:

scdl <track_url>

panic: runtime error: invalid memory address or nil pointer dereference

Ran into this when I tried to download a track
Probably due to the / symbol.

'/home/photon/go/bin/scdl' https://soundcloud.com/otteswed/aatrkdjjg5dq
[+] Parse m3u8 file succed 
[-] Open file failed: open ุงู”ูŠู…ู† ู…ูˆุณู‰ // ุงู„ุนู‚ุงุจูŠุฉ /ู†ุธุฑุฉ ุงูˆู„ู‰/ุญูู„ ุงู„ุงุณุชู‚ุจุงู„.mp3: no such file or directory
[+] Total 38 files to download 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x74f025]

goroutine 1 [running]:
github.com/imthaghost/scdl/joiner.(*Joiner).Run(0x0, 0x26, 0x87e430, 0x1f)
	/home/photon/go/src/github.com/imthaghost/scdl/joiner/join.go:48 +0x45
github.com/imthaghost/scdl/mp3.Merge(0xc0001ff080, 0x2af, 0xc000128000, 0x54)
	/home/photon/go/src/github.com/imthaghost/scdl/mp3/merge.go:241 +0x75c
github.com/imthaghost/scdl/soundcloud.ExtractSong(0x7ffd2402c2a8, 0x2c)
	/home/photon/go/src/github.com/imthaghost/scdl/soundcloud/song.go:80 +0x4b3
github.com/imthaghost/scdl/cmd.scdl(0xc000098e80, 0x1, 0x1)
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/base.go:17 +0x65
github.com/imthaghost/scdl/cmd.glob..func1(0xb40f00, 0xc000098e80, 0x1, 0x1)
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/root.go:31 +0xac
github.com/spf13/cobra.(*Command).execute(0xb40f00, 0xc0000a8030, 0x1, 0x1, 0xb40f00, 0xc0000a8030)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xb40f00, 0xb8d14a, 0x870463, 0x6)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/imthaghost/scdl/cmd.Execute()
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/root.go:43 +0x9f
main.main()
	/home/photon/go/src/github.com/imthaghost/scdl/main.go:6 +0x25

Error unmarshalling API response: unexpected end of JSON input

got this today trying to download, did soundcloud change their API?

'/home/photon/go/bin/scdl' https://soundcloud.com/otteswed/ucs6tqxvrmel
ู…ู„ุงูŠูƒุฉ ยฐู†ุณุฎุฉ ุงู„ููŠุฏูŠูˆ
[-] Error unmarshalling API response: unexpected end of JSON input
[-] Parse m3u8 file failed: Get "": unsupported protocol scheme ""
[+] Will save to ู…ู„ุงูŠูƒุฉ ยฐู†ุณุฎุฉ ุงู„ููŠุฏูŠูˆ.mp3
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x751bd6]

goroutine 1 [running]:
github.com/grafov/m3u8.(*MediaPlaylist).Count(...)
	/home/photon/go/pkg/mod/github.com/grafov/[email protected]/writer.go:727
github.com/imthaghost/scdl/mp3.Merge(0x0, 0x0, 0xc0000ac5a0, 0x26)
	/home/photon/go/src/github.com/imthaghost/scdl/mp3/merge.go:235 +0x516
github.com/imthaghost/scdl/soundcloud.ExtractSong(0x7ffe8be452a6, 0x2c)
	/home/photon/go/src/github.com/imthaghost/scdl/soundcloud/song.go:80 +0x4b3
github.com/imthaghost/scdl/cmd.scdl(0xc000098e80, 0x1, 0x1)
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/base.go:17 +0x65
github.com/imthaghost/scdl/cmd.glob..func1(0xb40f00, 0xc000098e80, 0x1, 0x1)
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/root.go:31 +0xac
github.com/spf13/cobra.(*Command).execute(0xb40f00, 0xc0000a8030, 0x1, 0x1, 0xb40f00, 0xc0000a8030)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xb40f00, 0xb8d14a, 0x870463, 0x6)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/photon/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/imthaghost/scdl/cmd.Execute()
	/home/photon/go/src/github.com/imthaghost/scdl/cmd/root.go:43 +0x9f
main.main()
	/home/photon/go/src/github.com/imthaghost/scdl/main.go:6 +0x25

Update Client ID functionality

The function GetClientID() currently has a hardcoded client ID. When this client ID expires it basically causes the rest of the functions to fail. So really need to look into getting the client ID directly from the doc on initial request.

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.