1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 22:07:16 +08:00
This commit is contained in:
Avi Peretz 2019-09-26 16:01:43 +03:00
parent 3a8fd3059f
commit 24f8b040f4

View File

@ -305,6 +305,7 @@ class VKIE(VKBaseIE):
video_id = '%s_%s' % (mobj.group('oid'), mobj.group('id'))
info_page = self._download_webpage(info_url, video_id)
url_page = self._download_webpage(url, video_id)
error_message = self._html_search_regex(
[r'(?s)<!><div[^>]+class="video_layer_message"[^>]*>(.+?)</div>',
@ -354,11 +355,15 @@ class VKIE(VKBaseIE):
r'<!>The video .+? is unavailable':
'Video %s is not available.',
r'You need to be a member of this group to view':
'Video %s is for group members only.',
}
for error_re, error_msg in ERRORS.items():
if re.search(error_re, info_page):
raise ExtractorError(error_msg % video_id, expected=True)
for page in [info_page, url_page]:
if re.search(error_re, page):
raise ExtractorError(error_msg % video_id, expected=True)
youtube_url = YoutubeIE._extract_url(info_page)
if youtube_url: