diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-03-19 00:53:26 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-03-19 00:53:26 +0600 |
commit | 73900846b16d33f769d35ac945a97a66cc17fd5c (patch) | |
tree | f6ebcad53d541a1fa42d746e7f838606c2143c2f | |
parent | d1dc7e39918ddfc3402a8ffd669e6c84ac971803 (diff) |
[ultimedia] Capture and output unavailable video message
-rw-r--r-- | youtube_dl/extractor/ultimedia.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ultimedia.py b/youtube_dl/extractor/ultimedia.py index 97e4445d4..0c1b08d7d 100644 --- a/youtube_dl/extractor/ultimedia.py +++ b/youtube_dl/extractor/ultimedia.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( + ExtractorError, qualities, unified_strdate, clean_html, @@ -49,6 +50,10 @@ class UltimediaIE(InfoExtractor): deliver_page = self._download_webpage( deliver_url, video_id, 'Downloading iframe page') + if '>This video is currently not available' in deliver_page: + raise ExtractorError( + 'Video %s is currently not available' % video_id, expected=True) + player = self._parse_json( self._search_regex( r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on", deliver_page, 'player'), |