aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/yandexmusic.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-28 17:08:41 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-28 17:08:41 +0800
commit7f776fa4b510b7973e08f06de556fa39cb5946e5 (patch)
tree52b7c902ff6cbb57a56486b778cbaad4418846cd /youtube_dl/extractor/yandexmusic.py
parenteb5ad31ce1cbcf355af26a335bef19c096ebaba0 (diff)
[yandexmusic] Skip tests as Travis CI blocked
Diffstat (limited to 'youtube_dl/extractor/yandexmusic.py')
-rw-r--r--youtube_dl/extractor/yandexmusic.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/youtube_dl/extractor/yandexmusic.py b/youtube_dl/extractor/yandexmusic.py
index 7a90cc60c..0d32a612f 100644
--- a/youtube_dl/extractor/yandexmusic.py
+++ b/youtube_dl/extractor/yandexmusic.py
@@ -22,6 +22,12 @@ class YandexMusicBaseIE(InfoExtractor):
if error:
raise ExtractorError(error, expected=True)
+ def _download_webpage(self, *args, **kwargs):
+ webpage = super(YandexMusicBaseIE, self)._download_webpage(*args, **kwargs)
+ if 'Нам очень жаль, но&nbsp;запросы, поступившие с&nbsp;вашего IP-адреса, похожи на&nbsp;автоматические.' in webpage:
+ raise ExtractorError('Blocked by YandexMusic', expected=True)
+ return webpage
+
def _download_json(self, *args, **kwargs):
response = super(YandexMusicBaseIE, self)._download_json(*args, **kwargs)
self._handle_error(response)
@@ -47,7 +53,8 @@ class YandexMusicTrackIE(YandexMusicBaseIE):
'album_artist': 'Carlo Ambrosio',
'artist': 'Carlo Ambrosio & Fabio Di Bari, Carlo Ambrosio',
'release_year': '2009',
- }
+ },
+ 'skip': 'Travis CI servers blocked by YandexMusic',
}
def _get_track_url(self, storage_dir, track_id):
@@ -139,6 +146,7 @@ class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
'title': 'Carlo Ambrosio - Gypsy Soul (2009)',
},
'playlist_count': 50,
+ 'skip': 'Travis CI servers blocked by YandexMusic',
}
def _real_extract(self, url):
@@ -171,6 +179,7 @@ class YandexMusicPlaylistIE(YandexMusicPlaylistBaseIE):
'description': 'md5:3b9f27b0efbe53f2ee1e844d07155cc9',
},
'playlist_count': 6,
+ 'skip': 'Travis CI servers blocked by YandexMusic',
}, {
# playlist exceeding the limit of 150 tracks shipped with webpage (see
# https://github.com/rg3/youtube-dl/issues/6666)
@@ -180,6 +189,7 @@ class YandexMusicPlaylistIE(YandexMusicPlaylistBaseIE):
'title': 'Музыка 90-х',
},
'playlist_count': 310,
+ 'skip': 'Travis CI servers blocked by YandexMusic',
}]
def _real_extract(self, url):