Open MahbodHastam opened 4 years ago
In order to bypass this error, I have edited the line 160 in spotify.py
'image' : data['album']['images'][0]['url'] if len(data['album']['images']) > 0 else ''
It's seem to work fine
I have a similar error when trying to download album from spotify, not sure how this causes the error in youtube.py:
python3 main.py -sa "https://open.spotify.com/album/4EYZaRvd05NA1IVzJZv8dd"
Downloading 1 of 12
Traceback (most recent call last):
File "main.py", line 771, in <module>
CLI.main(sys.argv[1:])
File "main.py", line 614, in main
md.downloadBySpotifyUriAlbumMode(array[i+1], CLI.path)
File "main.py", line 279, in downloadBySpotifyUriAlbumMode
self.__downloadMusicFromYoutube(fixed_name, info['uri'], info['duration_ms'])
File "main.py", line 34, in __downloadMusicFromYoutube
url=self.__youtube.getResult(),
File "/home/savo/smd/youtube.py", line 70, in getResult
return self.__result[i]
IndexError: list index out of range
Tried the hack by @RedstoneFireBE , but still getting the same error. Does anyone know any other trick?
I have a similar error when trying to download album from spotify, not sure how this causes the error in youtube.py:
python3 main.py -sa "https://open.spotify.com/album/4EYZaRvd05NA1IVzJZv8dd" Downloading 1 of 12 Traceback (most recent call last): File "main.py", line 771, in <module> CLI.main(sys.argv[1:]) File "main.py", line 614, in main md.downloadBySpotifyUriAlbumMode(array[i+1], CLI.path) File "main.py", line 279, in downloadBySpotifyUriAlbumMode self.__downloadMusicFromYoutube(fixed_name, info['uri'], info['duration_ms']) File "main.py", line 34, in __downloadMusicFromYoutube url=self.__youtube.getResult(), File "/home/savo/smd/youtube.py", line 70, in getResult return self.__result[i] IndexError: list index out of range
Spotify is only used to find song/playlist info lol. Same with everything else I think. It downloads from YT.
Tried the hack by @RedstoneFireBE , but still getting the same error. Does anyone know any other trick?
The way it searches is dead, I think. Search results are loaded through JS now. Looks like just using the API (or the unofficial YTMusic one) would work, especially for just getting a URL.