[yandexmusic:track] Fix extraction (closes #26449, closes #26669, closes #26747,...
authorSergey M․ <dstftw@gmail.com>
Sun, 29 Nov 2020 15:15:51 +0000 (22:15 +0700)
committerSergey M․ <dstftw@gmail.com>
Sun, 29 Nov 2020 15:15:51 +0000 (22:15 +0700)
youtube_dl/extractor/yandexmusic.py

index 08d35e04c968a497bc28f4c3207e8d63432bd8d4..5805caef29b0b292c8dd3ba888d36e2f23c1bde7 100644 (file)
@@ -109,8 +109,7 @@ class YandexMusicTrackIE(YandexMusicBaseIE):
             'Downloading track location JSON',
             query={'format': 'json'})
         key = hashlib.md5(('XGRlBW9FXlekgbPrRHuSiA' + fd_data['path'][1:] + fd_data['s']).encode('utf-8')).hexdigest()
-        storage = track['storageDir'].split('.')
-        f_url = 'http://%s/get-mp3/%s/%s?track-id=%s ' % (fd_data['host'], key, fd_data['ts'] + fd_data['path'], storage[1])
+        f_url = 'http://%s/get-mp3/%s/%s?track-id=%s ' % (fd_data['host'], key, fd_data['ts'] + fd_data['path'], track['id'])
 
         thumbnail = None
         cover_uri = track.get('albums', [{}])[0].get('coverUri')