mirror of
https://source.netsyms.com/Mirrors/youtube-dl
synced 2024-11-03 03:40:20 +00:00
[playvid] Capture and output error message
This commit is contained in:
parent
cb6444e197
commit
e987e91fcc
@ -4,6 +4,8 @@ import re
|
|||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
|
ExtractorError,
|
||||||
|
clean_html,
|
||||||
compat_urllib_parse,
|
compat_urllib_parse,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -28,6 +30,11 @@ class PlayvidIE(InfoExtractor):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
m_error = re.search(
|
||||||
|
r'<div class="block-error">\s*<div class="heading">\s*<div>(?P<msg>.+?)</div>\s*</div>', webpage)
|
||||||
|
if m_error:
|
||||||
|
raise ExtractorError(clean_html(m_error.group('msg')), expected=True)
|
||||||
|
|
||||||
video_title = None
|
video_title = None
|
||||||
duration = None
|
duration = None
|
||||||
video_thumbnail = None
|
video_thumbnail = None
|
||||||
|
Loading…
Reference in New Issue
Block a user