diff options
author | Sergey M․ <dstftw@gmail.com> | 2014-09-23 19:58:35 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2014-09-23 19:58:35 +0700 |
commit | 86916dae4b8604431205d11ccfa5f9796c0798dc (patch) | |
tree | 2a36fca01c895a7b3fe71d460f18f4cbd26b0c6c | |
parent | f7d159cf953bd1884ca45f535327f3016998270c (diff) |
[wat] Capture and output error message
-rw-r--r-- | youtube_dl/extractor/wat.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/youtube_dl/extractor/wat.py b/youtube_dl/extractor/wat.py index 46b4d9133..268e2f618 100644 --- a/youtube_dl/extractor/wat.py +++ b/youtube_dl/extractor/wat.py @@ -5,7 +5,10 @@ import re import hashlib from .common import InfoExtractor -from ..utils import unified_strdate +from ..utils import ( + ExtractorError, + unified_strdate, +) class WatIE(InfoExtractor): @@ -57,6 +60,11 @@ class WatIE(InfoExtractor): video_info = self.download_video_info(real_id) + error_desc = video_info.get('error_desc') + if error_desc: + raise ExtractorError( + '%s returned error: %s' % (self.IE_NAME, error_desc), expected=True) + geo_list = video_info.get('geoList') country = geo_list[0] if geo_list else '' |