mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[ultimedia] Capture and output unavailable video message
This commit is contained in:
parent
d1dc7e3991
commit
73900846b1
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
ExtractorError,
|
||||||
qualities,
|
qualities,
|
||||||
unified_strdate,
|
unified_strdate,
|
||||||
clean_html,
|
clean_html,
|
||||||
|
@ -49,6 +50,10 @@ def _real_extract(self, url):
|
||||||
deliver_page = self._download_webpage(
|
deliver_page = self._download_webpage(
|
||||||
deliver_url, video_id, 'Downloading iframe page')
|
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(
|
player = self._parse_json(
|
||||||
self._search_regex(
|
self._search_regex(
|
||||||
r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on", deliver_page, 'player'),
|
r"jwplayer\('player(?:_temp)?'\)\.setup\(({.+?})\)\.on", deliver_page, 'player'),
|
||||||
|
|
Loading…
Reference in a new issue