projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cbcbdd
)
[yandexmusic] Improve error handling
author
Sergey M․
<dstftw@gmail.com>
Thu, 28 Apr 2016 15:37:34 +0000
(21:37 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 28 Apr 2016 15:37:34 +0000
(21:37 +0600)
youtube_dl/extractor/yandexmusic.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/yandexmusic.py
b/youtube_dl/extractor/yandexmusic.py
index 0d32a612fb60064251137550e608e28b3c198d52..b0e68a0879e5d13fb91d3e240d8285795d3c8017 100644
(file)
--- a/
youtube_dl/extractor/yandexmusic.py
+++ b/
youtube_dl/extractor/yandexmusic.py
@@
-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)