From: Sergey M․ Date: Tue, 25 Aug 2015 17:29:02 +0000 (+0600) Subject: [yandexmusic] Skip removed tracks (#6666) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=6d53cdd6ce441dd7bc1d93bf1445f0594cfdffef;p=youtube-dl [yandexmusic] Skip removed tracks (#6666) --- diff --git a/youtube_dl/extractor/yandexmusic.py b/youtube_dl/extractor/yandexmusic.py index 91829be1c..166cbf344 100644 --- a/youtube_dl/extractor/yandexmusic.py +++ b/youtube_dl/extractor/yandexmusic.py @@ -67,7 +67,7 @@ class YandexMusicPlaylistBaseIE(InfoExtractor): return [ self.url_result( 'http://music.yandex.ru/album/%s/track/%s' % (track['albums'][0]['id'], track['id'])) - for track in tracks] + for track in tracks if track.get('albums') and isinstance(track.get('albums'), list)] class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):