LaurenceRawlings / savify

Download Spotify songs to mp3 with full metadata and cover art!
MIT License
1.19k stars 80 forks source link

[BUG] Download stuck in infinite loop #83

Open DanielSouzaBertoldi opened 1 year ago

DanielSouzaBertoldi commented 1 year ago

Describe the bug I've just setup a project to use this library and everytime I try to download a spotify song, the code gets stuck trying to extract the uploader id using yt-dl and then it tries to download it once again.

To Reproduce Honestly I just setup the project following the steps mentioned in the docs. My code looks like this:

s = Savify(
    api_credentials=(os.environ.get("SPOTIFY_CLI_ID"), os.environ.get("SPOTIFY_CLI_SC")),
    quality=Quality.BEST,
    download_format=Format.MP3,
    path_holder=PathHolder(
        downloads_path='./savify-downloads'
    ),
    group='%artist%/%album%',
    skip_cover_art=False,
    logger=Logger(log_location='./savify-logs', log_level=None) # Silent output
)
print(s.download("https://open.spotify.com/track/01a0H5HPeCMOktdRMygi3t?si=4069f95811ea416a"))

I'm running Python 3.11 using the latest version of Savify.

Expected behavior I expected the song to actually download or at least not be stuck in an infinite loop trying to get the uploader id from yt-dl.

Screenshots

image

Desktop (please complete the following information):

Additional context This is the full log that keeps repeating over and over again:

[INFO]  Downloading 1 songs...
[DEBUG] [download] Downloading playlist: BANKS - Stroke audio
[DEBUG] [youtube:search] query "BANKS - Stroke audio": Downloading page 1
[DEBUG] [youtube:search] playlist BANKS - Stroke audio: Downloading 1 videos
[DEBUG] [download] Downloading video 1 of 1
[DEBUG] [youtube] cA5oN62kk50: Downloading webpage
[DEBUG] [youtube] Downloading just video cA5oN62kk50 because of --no-playlist
[ERROR] ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[DEBUG] [download] Finished downloading playlist: BANKS - Stroke audio
[DEBUG] [download] Downloading playlist: BANKS - Stroke audio
[DEBUG] [youtube:search] query "BANKS - Stroke audio": Downloading page 1
[DEBUG] [youtube:search] playlist BANKS - Stroke audio: Downloading 1 videos
[DEBUG] [download] Downloading video 1 of 1
[DEBUG] [youtube] cA5oN62kk50: Downloading webpage
[DEBUG] [youtube] Downloading just video cA5oN62kk50 because of --no-playlist
[ERROR] ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
DanielSouzaBertoldi commented 1 year ago

Using this workaround fixed this issue.

https://github.com/LaurenceRawlings/savify/pull/58#issuecomment-1435059274