mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-21 17:42:50 +08:00
[yandexmusic] Improve error handling
This commit is contained in:
parent
0cbcbdd89d
commit
eebe6b382e
@ -18,9 +18,10 @@ from ..utils import (
|
||||
class YandexMusicBaseIE(InfoExtractor):
|
||||
@staticmethod
|
||||
def _handle_error(response):
|
||||
error = response.get('error')
|
||||
if error:
|
||||
raise ExtractorError(error, expected=True)
|
||||
if isinstance(response, dict):
|
||||
error = response.get('error')
|
||||
if error:
|
||||
raise ExtractorError(error, expected=True)
|
||||
|
||||
def _download_webpage(self, *args, **kwargs):
|
||||
webpage = super(YandexMusicBaseIE, self)._download_webpage(*args, **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user