From 4dc6d306c579c5226efece61819bad76a09955dd Mon Sep 17 00:00:00 2001 From: midexe6380 <65507149+midexe6380@users.noreply.github.com> Date: Tue, 29 Sep 2020 21:54:21 +0300 Subject: [PATCH] [yandex music] Fix yandexmusic.py #26449 (thanks @Geograph-us) https://github.com/ytdl-org/youtube-dl/issues/26449#issuecomment-700863588 --- youtube_dl/extractor/yandexmusic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/yandexmusic.py b/youtube_dl/extractor/yandexmusic.py index 08d35e04c..ec133053a 100644 --- a/youtube_dl/extractor/yandexmusic.py +++ b/youtube_dl/extractor/yandexmusic.py @@ -109,8 +109,8 @@ 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]) + storage = track['realId'] + f_url = 'http://%s/get-mp3/%s/%s?track-id=%s ' % (fd_data['host'], key, fd_data['ts'] + fd_data['path'], storage) thumbnail = None cover_uri = track.get('albums', [{}])[0].get('coverUri')