scdl-org / scdl

Soundcloud Music Downloader
GNU General Public License v2.0
3.34k stars 335 forks source link

connection closed prematurely / special characters in name? #261

Open 0x4a opened 6 years ago

0x4a commented 6 years ago

I try downloading a rather large list with the command scdl.exe -l https://soundcloud.com/das-kraftfuttermischwerk/sets/fusion-festival-2018 --download-archive archive.txt -c but keep failing at track 118 with message "connection closed prematurely, download incomplete".

Now, that track has the character "$" in its title, so I first thought that might be the problem. Or maybe it just got removed? So I opened the playlist to see, and found that this track is not in there, anymore. That is: soundcloud seems to skip it, it goes from 117 directly to 119? So might be a problem with soundcloud itself?

What are my ways to download the remaining 80 tracks of that list? Is there an option to skip that one track? Do I have to ask the maintainer of the list to remove it? Any other options?

Thanks in advance, Daniel

flyingrub commented 6 years ago

you can use the -o option to start at a certain track number. -o 119 for example.

0x4a commented 6 years ago

That works like a charm, thanks!

Any chance you can catch that error, so it automagically skips to the next track instead of aborting?

mic2100 commented 6 years ago

I've been experiencing the same issue. One of the track I was downloading had a special char which causes the error as described by the op. Also I have noticed this happening is a track is removed/hidden from Soundcloud.

For example If I download https://soundcloud.com/hdbeendope/sets/the-greay-t-area it tries to download 21 tracks but there are only 20 visible on the website, it actually fails on track 16 but that track is not visible on the website. So I suspect that the information your getting about playlists also contains details of tracks that it cannot download.

A solution would be to allow a flag to be set --skip-missing-tracks that allows it to skip over failed downloads so that it doesn't mess up the playlist and you don't keep having to use the offset option.

timwillhack commented 3 years ago

I was going to create a new ticket, but for this, I agree there should be a new flag sent in to skip on error. I manually just commented out the 'sys.exit' where its erroring but obviously it would be more robust if it used a flag.