[yandexmusic] Skip removed tracks (#6666)
authorSergey M․ <dstftw@gmail.com>
Tue, 25 Aug 2015 17:29:02 +0000 (23:29 +0600)
committerSergey M․ <dstftw@gmail.com>
Tue, 25 Aug 2015 17:29:02 +0000 (23:29 +0600)
youtube_dl/extractor/yandexmusic.py

index 91829be1c2d367d8e58a3e1a1901a71e31d2e64a..166cbf34431931717df78c80e9cd34e415a4c555 100644 (file)
@@ -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):