diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-30 01:07:28 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-01-30 01:07:28 +0530 |
commit | a3373da70c97d356bd4927eff403abd261dd8f9f (patch) | |
tree | fb77c8f297d7ca1bd6a6f3e37a4c0a4b12399db5 /youtube_dl/extractor/googledrive.py | |
parent | 2c4cb134a90b49a4d44965b57ff43cfd45ec2d69 (diff) | |
parent | 5014bd67c22b421207b2650d4dc874b95b36dda1 (diff) | |
download | youtube-dl-a3373da70c97d356bd4927eff403abd261dd8f9f.tar.xz |
Merge branch 'UP/youtube-dl' into dl/YoutubeSearchURLIE
Diffstat (limited to 'youtube_dl/extractor/googledrive.py')
-rw-r--r-- | youtube_dl/extractor/googledrive.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py index de8c80e36..3f2de00f1 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/youtube_dl/extractor/googledrive.py @@ -7,6 +7,7 @@ from ..compat import compat_parse_qs from ..utils import ( determine_ext, ExtractorError, + get_element_by_class, int_or_none, lowercase_escape, try_get, @@ -237,7 +238,7 @@ class GoogleDriveIE(InfoExtractor): if confirmation_webpage: confirm = self._search_regex( r'confirm=([^&"\']+)', confirmation_webpage, - 'confirmation code', fatal=False) + 'confirmation code', default=None) if confirm: confirmed_source_url = update_url_query(source_url, { 'confirm': confirm, @@ -245,6 +246,11 @@ class GoogleDriveIE(InfoExtractor): urlh = request_source_file(confirmed_source_url, 'confirmed source') if urlh and urlh.headers.get('Content-Disposition'): add_source_format(urlh) + else: + self.report_warning( + get_element_by_class('uc-error-subcaption', confirmation_webpage) + or get_element_by_class('uc-error-caption', confirmation_webpage) + or 'unable to extract confirmation code') if not formats and reason: raise ExtractorError(reason, expected=True) |