LaurenceRawlings / savify

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

[BUG] youtube-dl version issues #84

Closed jcwimer closed 1 year ago

jcwimer commented 1 year ago

Describe the bug I get the following error when using savify:

[ERROR] ERROR: Signature extraction failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/extractor/youtube.py", line 1303, in _decrypt_signature
    func = self._extract_signature_function(
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/extractor/youtube.py", line 1216, in _extract_signature_function
    cache_res = res(test_string)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/extractor/youtube.py", line 1280, in <lambda>
    return lambda s: initial_function([s])
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/jsinterp.py", line 258, in resf
    res, abort = self.interpret_statement(stmt, local_vars)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/jsinterp.py", line 56, in interpret_statement
    v = self.interpret_expression(expr, local_vars, allow_recursion)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl-2021.1.24.1-py3.8.egg/youtube_dl/jsinterp.py", line 182, in interpret_expression
    return obj[member](argvals)
KeyError: 'QV'
 (caused by KeyError('QV')); 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.

This seems to be from yt-dl: https://github.com/ytdl-org/youtube-dl/issues/32314

To Reproduce

#!/bin/bash

docker pull laurencerawlings/savify:latest

while read p; do
  name=$(echo $p | awk '{print $2}')
  url=$(echo $p | awk '{print $1}')
  echo Downloading $name
  docker run --rm -v "`pwd`:/root/.local/share/Savify/downloads" \
           -e SPOTIPY_CLIENT_ID=MY_CLIENT_ID\
           -e SPOTIPY_CLIENT_SECRET=MY_CLIENT_SECRET\
           laurencerawlings/savify:latest $url -g "%artist%/%album%"

  # -g "%artist%/%album%" saves in artist/album/file.mp3
done <playlist.txt

Expected behavior

I expect it to download my playlist. This has worked fine in the past.

Screenshots N/A

Desktop (please complete the following information): Ubuntu Docker latest image

Additional context N/A

joamjoamjoam commented 1 year ago

As a workaround you can add the following to the dockerfile to install the latest from source. (or use it for your local environment)

RUN pip install --upgrade --force-reinstall "git+https://github.com/ytdl-org/youtube-dl.git"

jcwimer commented 1 year ago

As a workaround you can add the following to the dockerfile to install the latest from source. (or use it for your local environment)

RUN pip install --upgrade --force-reinstall "git+https://github.com/ytdl-org/youtube-dl.git"

I went ahead and did this. It's working now thank you.