opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

gdown: when curl and wget can't handle Google Drive downloads
GitHub RepoImpressions2

Project Description

View on GitHub

Stop Fighting Google Drive: gdown Makes Downloads Actually Work

You know the drill: you find a public dataset or model file hosted on Google Drive, fire off wget or curl, and watch it fail—either with a virus-scan warning page, a confusing HTML file saved as your download, or a URL that just won't resolve. It's one of those annoyances that shouldn't exist, but it does, and it's not going away. That's exactly the problem gdown solves: it's a command-line tool that handles Google Drive downloads so you don't have to think about the mess underneath.

What It Does

gdown is a Python-based downloader (requiring Python 3.10 or later) that's built specifically for Google Drive public files and folders. The core idea is simple: you give it a Drive URL, a file ID, or a share link, and it fetches the file for you—skipping the confirmation page that Google serves for large files, which is the exact thing that breaks curl and wget.

Under the hood, it handles the quirks of Google's URL formats and download endpoints. You can install it via pip install gdown or with uv tool install gdown, and then use it from the command line. It's not a library you import into your own code (though the README shows Python API usage in the screenshots); it's a standalone utility that fits into your shell workflow.

The tool goes beyond single files. It can recursively download entire folders, export Google Docs, Sheets, and Slides into common formats like PDF or DOCX, resume interrupted downloads, limit your download speed, and even route traffic through a proxy. It also works as a plain HTTP/HTTPS downloader, so it can double as a curl substitute when you need a more forgiving option.

Why It's Cool

The best tools solve a specific pain point without adding complexity, and gdown nails that. Here's what makes it stand out:

  • It just works with messy URLs. You can paste a share link like https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing directly, or use the bare file ID. No manual URL parsing, no figuring out which parameter goes where.

  • The --json flag is genuinely clever. Instead of forcing you to guess filenames, you can resolve what Google Drive actually calls the file without downloading it. The README shows a neat pattern: grab the real filename, extract its extension, and save it under whatever name you want. It's marked as beta, but it's already useful for scripting.

  • Folder downloads are a lifesaver. If you've ever tried to download a shared Drive folder with dozens of files, you know the browser's "Download all" button is unreliable at best. gdown's --folder flag handles it recursively, and you can even pipe the JSON output through jq to filter and download only specific files.

  • It respects your workflow. Speed limiting, proxy support, and --continue for resuming partial downloads—these are the features you'd expect from a serious download tool, not a quick hack. The fact that it also works with regular HTTP URLs means it's not a one-trick pony.

  • Google Docs export is a hidden gem. Downloading a Slides presentation as a PDF with --format pdf is the kind of convenience that saves you from opening a browser, navigating to File > Download, and waiting for the export spinner.

How to Try It

Getting started is straightforward. First, install it:

pip install gdown

Or, if you prefer uv:

uv tool install gdown

Then try a basic download. You can use a file ID or a full URL:

# Download by file ID
gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Or paste a share link
gdown 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing'

Want to grab an entire folder? Add the --folder flag:

gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder --folder

If a download gets interrupted, you can resume it:

gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --continue

The repository README has more examples, including the Google Docs export options and the --json workflow for scripting.

Final Thoughts

gdown isn't flashy, and it doesn't need to be. It solves a real, recurring problem with a clean CLI and a handful of thoughtful options. If you regularly pull datasets, model weights, or shared files from Google Drive, this tool will save you from the same frustrating loop of copy-pasting URLs and praying your download doesn't silently fail. It's the kind of utility you install once, forget about, and then wonder how you ever managed without it—until the next time you need to grab a Drive folder and it just works.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 494ac32f-4b0e-4d0f-824a-8d8cac2448efLast updated: August 25, 2026 at 02:46 AM