Is there any way to skip the songs on the front end instead of the back end of the program run so that it doesn't take as long to run a long playlist?
Nope, sorry. For every track being dowloaded, the tool needs to first fetch its corresponding metadata from Spotify and YouTube. Once it has this metadata, only then it can generate a filename for the current track being downloaded. If it now checks that a file with this filename already exists beforehand then the --overwrite option comes into play.
ERROR: Signature extraction failed: Traceback (most recent call last):
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1384, in _decrypt_signature
func = self._extract_signature_function(
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/c31ba6fc/player_ias.vflset/en_US/base.js'; 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.
(caused by ExtractorError("Cannot identify player 'https://www.youtube.com/s/player/c31ba6fc/player_ias.vflset/en_US/base.js'; 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.")); 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.
Traceback (most recent call last):
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1384, in _decrypt_signature
func = self._extract_signature_function(
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/c31ba6fc/player_ias.vflset/en_US/base.js'; 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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\programme\python\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\common.py", line 530, in extract
ie_result = self._real_extract(url)
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 2047, in _real_extract
signature = self._decrypt_signature(
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1394, in _decrypt_signature
raise ExtractorError(
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1384, in _decrypt_signature
func = self._extract_signature_function(
File "d:\programme\python\lib\site-packages\youtube_dl\extractor\youtube.py", line 1262, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
youtube_dl.utils.ExtractorError: Cannot identify player 'https://www.youtube.com/s/player/c31ba6fc/player_ias.vflset/en_US/base.js'; 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.
(caused by ExtractorError("Cannot identify player 'https://www.youtube.com/s/player/c31ba6fc/player_ias.vflset/en_US/base.js'; 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.")); 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
Traceback (most recent call last):
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\command_line\core.py", line 346, in download_tracks_from_file
metadata = search_metadata.on_youtube_and_spotify()
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\metadata_search.py", line 89, in on_youtube_and_spotify
metadata = caller()
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\metadata_search.py", line 186, in _on_youtube_and_spotify_for_type_spotify
youtube_metadata = self.providers["youtube"].from_url(youtube_video["url"])
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\metadata\providers\youtube.py", line 230, in from_url
content = pytube.YouTube(url)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\pytube__main.py", line 91, in init
self.prefetch()
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\pytube\main__.py", line 162, in prefetch
self.watch_html = request.get(url=self.watch_url)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\pytube\request.py", line 36, in get
return _execute_request(url).read().decode("utf-8")
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\pytube\request.py", line 24, in _execute_request
return urlopen(request) # nosec
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 564, in error
result = self._call_chain(args)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
result = func(args)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 570, in error
return self._call_chain(args)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 504, in _call_chain
result = func(args)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\d4red\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\d4red\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\d4red\AppData\Local\Programs\Python\Python36\Scripts\spotdl.exe__main.py", line 9, in <module>
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\command_line\main__.py", line 48, in main
spotdl.match_arguments()
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\command_line\core.py", line 79, in match_arguments
self.arguments["list"],
File "c:\users\d4red\appdata\local\programs\python\python36\lib\site-packages\spotdl\command_line\cor
HTTP Error 429: Too Many Requests
error lately. Check out #745. This is YouTube rate-limiting us and should fix itself after waiting for a while.
The easiest way I can think of would be to use screen or tmux. With screen you would go around like below:
Create a screen session in your SSH session:
$ ssh 127.0.0.1
$ screen
Now invoke spotdl however you want to.
Hit ctrl+a then ctrl+d here which will disconnect from the screen session but will allow it to keep running in the background. Now you can disconnect your SSH session and the downloads should keep running on the machine.
If you want to anytime monitor the download progress, SSH into your machine and run screen -x
in it to connect to the already existing screen session (which is where spotdl process is in).
The easiest way I can think of would be to use screen or tmux. With screen you would go around like below:
Create a screen session in your SSH session:
$ ssh 127.0.0.1 $ screen
Now invoke spotdl however you want to.
Hit ctrl+a then ctrl+d here which will disconnect from the screen session but will allow it to keep running in the background. Now you can disconnect your SSH session and the downloads should keep running on the machine.
If you want to anytime monitor the download progress, SSH into your machine and run
screen -x
in it to connect to the already existing screen session (which is where spotdl process is in).
thanks
My code -:
from spotdl import Spotdl
spotify = Spotdl()
spotify.download_track("https://open.spotify.com/user/nocopyrightsounds/playlist/7sZbq8QGyMnhKPcLJvCUFD")
Error -
Expected id of type track but found type playlist https://open.spotify.com/user/nocopyrightsounds/playlist/7sZbq8QGyMnhKPcLJvCUFD
HTTP Error for GET to https://api.spotify.com/v1/tracks/7sZbq8QGyMnhKPcLJvCUFD returned 404 due to non existing id
Exception in thread Thread-6:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotipy\client.py", line 175, in _internal_call
response.raise_for_status()
File "C:\Users\Ritik-PC\AppData\Roaming\Python\Python36\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/tracks/7sZbq8QGyMnhKPcLJvCUFD
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\util.py", line 39, in run
**self._kwargs
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\command_line\core.py", line 221, in threaded_metadata
metadata = search_metadata.on_youtube_and_spotify()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\metadata_search.py", line 89, in on_youtube_and_spotify
metadata = caller(self.track)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\metadata_search.py", line 183, in _on_youtube_and_spotify_for_type_spotify
spotify_metadata = self._on_spotify_for_type_spotify(url)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\metadata_search.py", line 246, in _on_spotify_for_type_spotify
spotify_metadata = self.providers["spotify"].from_url(url)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotdl\metadata\providers\spotify.py", line 26, in from_url
metadata = self.spotify.track(url)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotipy\client.py", line 257, in track
return self._get("tracks/" + trid)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotipy\client.py", line 210, in _get
return self._internal_call("GET", url, payload, kwargs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\spotipy\client.py", line 190, in _internal_call
headers=response.headers,
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/tracks/7sZbq8QGyMnhKPcLJvCUFD:
non existing id
How i can download playlist
You cannot directly pass a playlist for download. Try this instead:
from spotdl.helpers.spotify import SpotifyHelpers
from spotdl import Spotdl
from spotdl import util
import logging
util.install_logger(logging.INFO)
playlist_uri = "https://open.spotify.com/user/nocopyrightsounds/playlist/7sZbq8QGyMnhKPcLJvCUFD"
tracks_file = "tracks.txt"
with Spotdl() as spotdl_handler:
spotify_tools = SpotifyHelpers()
playlist = spotify_tools.fetch_playlist(playlist_uri)
spotify_tools.write_playlist_tracks(playlist, tracks_file)
spotdl_handler.download_tracks_from_file(tracks_file)
I'm still on working on the API docs but hope this clears some stuff.
You cannot directly pass a playlist for download. Try this instead:
from spotdl.helpers.spotify import SpotifyHelpers from spotdl import Spotdl from spotdl import util import logging util.install_logger(logging.INFO) playlist_uri = "https://open.spotify.com/user/nocopyrightsounds/playlist/7sZbq8QGyMnhKPcLJvCUFD" tracks_file = "tracks.txt" with Spotdl() as spotdl_handler: spotify_tools = SpotifyHelpers() playlist = spotify_tools.fetch_playlist(playlist_uri) spotify_tools.write_playlist_tracks(playlist, tracks_file) spotdl_handler.download_tracks_from_file(tracks_file)
I'm still on working on the API docs but hope this clears some stuff.
thanks
termux-setup-storage
and then modify your ~/.config/spotdl/config.yml
to save tracks somewhere in the shared storage directory, so that you can access songs from other apps.