mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-01 06:21:09 +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:
|
try:
|
||||||
webpage, urlh = self._download_webpage_handle(url, folder_id, headers=headers)
|
webpage, urlh = self._download_webpage_handle(url, folder_id, headers=headers)
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
if isinstance(e.cause, HTTPError) and e.cause.status == 404:
|
if isinstance(e.cause, HTTPError):
|
||||||
self.raise_no_formats(e.cause.msg)
|
if e.cause.status == 404:
|
||||||
|
self.raise_no_formats(e.cause.msg)
|
||||||
|
elif e.cause.status == 403:
|
||||||
|
self.raise_login_required('Access Denied!')
|
||||||
raise
|
raise
|
||||||
if urllib.parse.urlparse(urlh.url).netloc == 'accounts.google.com':
|
if urllib.parse.urlparse(urlh.url).netloc == 'accounts.google.com':
|
||||||
self.raise_login_required('This video is only available for registered users')
|
self.raise_login_required('This video is only available for registered users')
|
||||||
|
|
Loading…
Reference in a new issue