From 67475072361f3beccdd6e8408fad155f64a74174 Mon Sep 17 00:00:00 2001 From: Stefan-Gabriel Muscalu Date: Wed, 8 Apr 2020 13:30:09 +0300 Subject: [PATCH 1/2] [GoogleDrive] fix redirect loop (closes #23919) --- youtube_dl/extractor/googledrive.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py index 589e4d5c3..85c6517f3 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/youtube_dl/extractor/googledrive.py @@ -265,6 +265,8 @@ class GoogleDriveIE(InfoExtractor): subtitles_id = ttsurl.encode('utf-8').decode( 'unicode_escape').split('=')[-1] + self._downloader.cookiejar.clear('.google.com') + return { 'id': video_id, 'title': title, From d35cf6b7ba16880565d8c972bd082fcf74a18e71 Mon Sep 17 00:00:00 2001 From: Stefan-Gabriel Muscalu Date: Thu, 9 Apr 2020 11:16:17 +0300 Subject: [PATCH 2/2] [GoogleDrive] fix: don't nuke entire .google.com cookie jar --- youtube_dl/extractor/googledrive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/googledrive.py b/youtube_dl/extractor/googledrive.py index 85c6517f3..886fdd532 100644 --- a/youtube_dl/extractor/googledrive.py +++ b/youtube_dl/extractor/googledrive.py @@ -265,7 +265,7 @@ class GoogleDriveIE(InfoExtractor): subtitles_id = ttsurl.encode('utf-8').decode( 'unicode_escape').split('=')[-1] - self._downloader.cookiejar.clear('.google.com') + self._downloader.cookiejar.clear(domain='.google.com', path='/', name='NID') return { 'id': video_id,