From 84bbd3e2ca9dc9486ab293240bed50b63c3b120d Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 17 Feb 2022 04:46:34 -0500 Subject: [PATCH] Fix Gdown / Google Drive issue? --- scripts/download_internet_file.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/download_internet_file.py b/scripts/download_internet_file.py index ccce983600..7485701842 100755 --- a/scripts/download_internet_file.py +++ b/scripts/download_internet_file.py @@ -38,7 +38,12 @@ def _normalize_google_drive_url(url): return url document_token = match_groups[0] - return 'https://drive.google.com/uc?id={}'.format(document_token) + + # NB(2022-02-17): Google appears to have broken downloads + # Using this fix with URL structure: + # https://github.com/wkentaro/gdown/issues/146#issuecomment-1042382215 + # OLD FORMAT: return 'https://drive.google.com/uc?id={}'.format(document_token) + return 'https://drive.google.com/uc?export=download&confirm=pbef&id={}'.format(document_token) def download_url_or_gdrive(url, output_filename):