1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-24 16:51:36 +00:00

[ultimedia] Capture and output unavailable video message

This commit is contained in:
Sergey M․ 2015-03-19 00:53:26 +06:00
parent d1dc7e3991
commit 73900846b1

View file

@ -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'),