Skip to content

Instantly share code, notes, and snippets.

@lulingar
lulingar / download_google_drive_folder.py
Last active April 13, 2025 15:47 — forked from star0202/download_google_drive_folder.py
Downloads a Google Drive folder recursively, including contained shortcuts to other Drive folders.
from argparse import ArgumentParser
from os import mkdir, remove
from os.path import exists
from pathlib import Path
from urllib.parse import urlparse
from google.auth.transport.requests import Request
from google.auth.external_account_authorized_user import (
Credentials as ExternalAccountCredentials,
)