mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-23 07:12:58 +08:00
Don't display warming messsage about confirmation code when file isn't downloadble
This commit is contained in:
parent
5547014ad9
commit
dbbceeb02b
@ -60,6 +60,10 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://drive.google.com/uc?id=0B2fjwgkl1A_CX083Tkowdmt6d28',
|
'url': 'https://drive.google.com/uc?id=0B2fjwgkl1A_CX083Tkowdmt6d28',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
# no downloadable video
|
||||||
|
'url': 'https://drive.google.com/file/d/1L_ao48RH6DoHXGhBYdXo4UjfEkTDyReY/view',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
_FORMATS_EXT = {
|
_FORMATS_EXT = {
|
||||||
'5': 'flv',
|
'5': 'flv',
|
||||||
@ -238,13 +242,14 @@ class GoogleDriveIE(InfoExtractor):
|
|||||||
urlh, url, video_id, note='Downloading confirmation page',
|
urlh, url, video_id, note='Downloading confirmation page',
|
||||||
errnote='Unable to confirm download', fatal=False)
|
errnote='Unable to confirm download', fatal=False)
|
||||||
if confirmation_webpage:
|
if confirmation_webpage:
|
||||||
confirm = self._search_regex(
|
if 'uc-error-caption' not in confirmation_webpage:
|
||||||
r'confirm=([^&"\']+)', confirmation_webpage,
|
confirm = self._search_regex(
|
||||||
'confirmation code', fatal=False)
|
r'confirm=([^&"\']+)', confirmation_webpage,
|
||||||
if confirm:
|
'confirmation code', fatal=False)
|
||||||
add_source_format(update_url_query(source_url, {
|
if confirm:
|
||||||
'confirm': confirm,
|
add_source_format(update_url_query(source_url, {
|
||||||
}))
|
'confirm': confirm,
|
||||||
|
}))
|
||||||
|
|
||||||
if not formats:
|
if not formats:
|
||||||
reason = self._search_regex(
|
reason = self._search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user