scdl-org / scdl

Soundcloud Music Downloader
GNU General Public License v2.0
3.29k stars 331 forks source link

Some specific song won't download #476

Closed Panini2 closed 4 months ago

Panini2 commented 4 months ago

as soon as the script tries to download certain songs ("Downloading the original file") this error shows up

(song used for this command : https://soundcloud.com/sakuzyo/destr0yer-feat-nikki-simmons-afterwar)

Downloading Destr0yer feat. Nikki Simmons [Afterwar]
Downloading the original file.
Traceback (most recent call last):
  File "/home/panini2/.local/bin/scdl", line 8, in <module>
    sys.exit(main())
  File "/home/panini2/.local/lib/python3.10/site-packages/scdl/scdl.py", line 239, in main
    download_url(client, **python_args)
  File "/home/panini2/.local/lib/python3.10/site-packages/scdl/scdl.py", line 324, in download_url
    download_track(client, like.track, exit_on_fail=kwargs.get("strict_playlist"), **kwargs)
  File "/home/panini2/.local/lib/python3.10/site-packages/scdl/scdl.py", line 718, in download_track
    filename, is_already_downloaded = download_original_file(client, track, title, playlist_info, **kwargs)
  File "/home/panini2/.local/lib/python3.10/site-packages/scdl/scdl.py", line 586, in download_original_file
    total_length = int(r.headers.get("content-length"))
NameError: name 'r' is not defined 

it can also be reproduced with these links :

is there anything i can do to fix this error ?

Panini2 commented 4 months ago

Hello, how can i test the modification brought to the code by @adithayyil ?

7x11x13 commented 4 months ago

Can you try the new version (2.7.7)

Panini2 commented 4 months ago

Done. it now works like a charm ^^ Thank you very much guys !