Full Error As Follows
Enter the spotify URL link: https://open.spotify.com/playlist/649OfpVgIVrppB0zRV7kAJ?si=d0437a0d0962449d
Could not find playlist name please provide a name
Please open https://www.google.com/device and input code RPKM-CVMR
Press enter when you have completed this step.
HTTP Error 428: Precondition Required
Traceback (most recent call last):
File "D:\Durgesh Files\Programming\TESTS\spotify2mp3\run.py", line 176, in finalize_download
yt_vid_obj = yt_dl_obj.streams.filter(only_audio=True)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube_main_.py", line 296, in streams
return StreamQuery(self.fmt_streams)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube_main_.py", line 176, in fmt_streams
stream_manifest = extract.apply_descrambler(self.streaming_data)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube_main_.py", line 157, in streaming_data
if 'streamingData' in self.vid_info:
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube_main_.py", line 246, in vid_info
innertube_response = innertube.player(self.video_id)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\innertube.py", line 300, in player
return self._call_api(endpoint, query, self.base_data)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\innertube.py", line 239, in _call_api
self.fetch_bearer_token()
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\innertube.py", line 187, in fetch_bearer_token
response = request._execute_request(
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\request.py", line 37, in _execute_request
return urlopen(request, timeout=timeout) # nosec
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 525, in open
response = meth(req, response)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 563, in error
return self._call_chain(*args)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
File "C:\Users\Durgesh\AppData\Local\Programs\Python\Python310\lib\urllib\request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 428: Precondition Required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Durgesh Files\Programming\TESTS\spotify2mp3\run.py", line 562, in
main()
File "D:\Durgesh Files\Programming\TESTS\spotify2mp3\run.py", line 546, in main
download_playlist(spotify_url_link, playlist_name, linkAdd, token)
File "D:\Durgesh Files\Programming\TESTS\spotify2mp3\run.py", line 423, in download_playlist
finalize_download(song, skipped_songs, failed_downloads, legal_path_characters, folder_name, spotify_playlist_id)
File "D:\Durgesh Files\Programming\TESTS\spotify2mp3\run.py", line 238, in finalize_download
failed_song_names = failed_song_names + "\t• " + song_name + " - " + artist + f" | Fail reason: {e}" + "\n"
UnboundLocalError: local variable 'failed_song_names' referenced before assignment
And Please make sure that this works with my playlist as well because when i entered my spotify playlist link that time it showed the error Could not find playlist name please provide a name
my spotify playlist link https://open.spotify.com/playlist/649OfpVgIVrppB0zRV7kAJ?si=17295df20e494ef7