1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 02:33:21 +08:00

[yandexmusic] Skip tests as Travis CI blocked

This commit is contained in:
Yen Chi Hsuan 2016-04-28 17:08:41 +08:00
parent eb5ad31ce1
commit 7f776fa4b5
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -22,6 +22,12 @@ class YandexMusicBaseIE(InfoExtractor):
if error: if error:
raise ExtractorError(error, expected=True) raise ExtractorError(error, expected=True)
def _download_webpage(self, *args, **kwargs):
webpage = super(YandexMusicBaseIE, self)._download_webpage(*args, **kwargs)
if 'Нам очень жаль, но запросы, поступившие с вашего IP-адреса, похожи на автоматические.' in webpage:
raise ExtractorError('Blocked by YandexMusic', expected=True)
return webpage
def _download_json(self, *args, **kwargs): def _download_json(self, *args, **kwargs):
response = super(YandexMusicBaseIE, self)._download_json(*args, **kwargs) response = super(YandexMusicBaseIE, self)._download_json(*args, **kwargs)
self._handle_error(response) self._handle_error(response)
@ -47,7 +53,8 @@ class YandexMusicTrackIE(YandexMusicBaseIE):
'album_artist': 'Carlo Ambrosio', 'album_artist': 'Carlo Ambrosio',
'artist': 'Carlo Ambrosio & Fabio Di Bari, Carlo Ambrosio', 'artist': 'Carlo Ambrosio & Fabio Di Bari, Carlo Ambrosio',
'release_year': '2009', 'release_year': '2009',
} },
'skip': 'Travis CI servers blocked by YandexMusic',
} }
def _get_track_url(self, storage_dir, track_id): def _get_track_url(self, storage_dir, track_id):
@ -139,6 +146,7 @@ class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
'title': 'Carlo Ambrosio - Gypsy Soul (2009)', 'title': 'Carlo Ambrosio - Gypsy Soul (2009)',
}, },
'playlist_count': 50, 'playlist_count': 50,
'skip': 'Travis CI servers blocked by YandexMusic',
} }
def _real_extract(self, url): def _real_extract(self, url):
@ -171,6 +179,7 @@ class YandexMusicPlaylistIE(YandexMusicPlaylistBaseIE):
'description': 'md5:3b9f27b0efbe53f2ee1e844d07155cc9', 'description': 'md5:3b9f27b0efbe53f2ee1e844d07155cc9',
}, },
'playlist_count': 6, 'playlist_count': 6,
'skip': 'Travis CI servers blocked by YandexMusic',
}, { }, {
# playlist exceeding the limit of 150 tracks shipped with webpage (see # playlist exceeding the limit of 150 tracks shipped with webpage (see
# https://github.com/rg3/youtube-dl/issues/6666) # https://github.com/rg3/youtube-dl/issues/6666)
@ -180,6 +189,7 @@ class YandexMusicPlaylistIE(YandexMusicPlaylistBaseIE):
'title': 'Музыка 90-х', 'title': 'Музыка 90-х',
}, },
'playlist_count': 310, 'playlist_count': 310,
'skip': 'Travis CI servers blocked by YandexMusic',
}] }]
def _real_extract(self, url): def _real_extract(self, url):