mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-28 22:24:34 +01:00
[GoogleDriveFolderIE] raise for access denied
This commit is contained in:
parent
28ed64d87a
commit
b81a41d5ff
1 changed files with 5 additions and 2 deletions
|
@ -360,8 +360,11 @@ class GoogleDriveFolderIE(InfoExtractor):
|
|||
try:
|
||||
webpage, urlh = self._download_webpage_handle(url, folder_id, headers=headers)
|
||||
except ExtractorError as e:
|
||||
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
|
||||
self.raise_no_formats(e.cause.msg)
|
||||
if isinstance(e.cause, HTTPError):
|
||||
if e.cause.status == 404:
|
||||
self.raise_no_formats(e.cause.msg)
|
||||
elif e.cause.status == 403:
|
||||
self.raise_login_required('Access Denied!')
|
||||
raise
|
||||
if urllib.parse.urlparse(urlh.url).netloc == 'accounts.google.com':
|
||||
self.raise_login_required('This video is only available for registered users')
|
||||
|
|
Loading…
Reference in a new issue