{"id":13469201,"url":"https://github.com/wkentaro/gdown","last_synced_at":"2026-10-18T23:47:46.432Z","repository":{"id":37271457,"uuid":"44421756","full_name":"wkentaro/gdown","owner":"wkentaro","description":"Google Drive public file downloader when curl/wget fails.","archived":false,"fork":false,"pushed_at":"2026-10-09T00:49:36.000Z","size":1551,"stargazers_count":5451,"open_issues_count":0,"forks_count":432,"subscribers_count":22,"default_branch":"main","last_synced_at":"2026-10-10T21:33:53.937Z","etag":null,"topics":["curl","download","downloader","google-drive","python","wget"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wkentaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["wkentaro"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2015-10-17T03:01:23.000Z","updated_at":"2026-10-10T12:55:09.000Z","dependencies_parsed_at":"2024-09-15T17:22:17.883Z","dependency_job_id":null,"html_url":"https://github.com/wkentaro/gdown","commit_stats":{"total_commits":509,"total_committers":26,"mean_commits":"19.576923076923077","dds":0.1866404715127702,"last_synced_commit":"eeb6995f2e077991576b35956983bbefe34cf057"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"purl":"pkg:github/wkentaro/gdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fgdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fgdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fgdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fgdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wkentaro","download_url":"https://codeload.github.com/wkentaro/gdown/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fgdown/sbom","scorecard":{"id":1241034,"data":{"date":"2026-01-05","repo":{"name":"github.com/wkentaro/gdown","commit":"c7c1b9d2bae2be11112bbe88de1f64ac90416cf2"},"scorecard":{"version":"v5.4.1-0.20251227023010-525a93017816","commit":"525a93017816fa74238c545bdecac6af16ce00f1"},"score":4.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":4,"reason":"Found 7/15 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/wkentaro/gdown/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/wkentaro/gdown/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/wkentaro/gdown/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/wkentaro/gdown/release.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:44","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   1 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#sast"}}]},"last_synced_at":"2026-01-11T15:00:24.301Z","repository_id":37271457,"created_at":"2026-01-11T15:00:24.302Z","updated_at":"2026-01-11T15:00:24.302Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38343425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curl","download","downloader","google-drive","python","wget"],"created_at":"2024-07-31T15:01:28.987Z","updated_at":"2026-10-18T23:47:46.426Z","avatar_url":"https://github.com/wkentaro.png","language":"Python","funding_links":["https://github.com/sponsors/wkentaro"],"categories":["Python","Utilities","Data Loading \u0026 Extraction","Data Format \u0026 I/O","[](#table-of-contents) Table of contents","python"],"sub_categories":["Command Line Tools","For Python","[](#universal)Universal"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003egdown\u003c/h1\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/gdown.svg)](https://pypi.org/project/gdown/)\n[![Python](https://img.shields.io/pypi/pyversions/gdown.svg)](https://pypi.org/project/gdown/)\n[![Build](https://github.com/wkentaro/gdown/actions/workflows/test.yml/badge.svg)](https://github.com/wkentaro/gdown/actions/workflows/test.yml)\n[![License](https://img.shields.io/pypi/l/gdown.svg)](https://pypi.org/project/gdown/)\n\nGoogle Drive public file/folder downloader when curl/wget fails.\n\n\u003cimg src=\"https://github.com/wkentaro/gdown/raw/main/assets/cli.png\" width=\"80%\"\u003e\n\u003cimg src=\"https://github.com/wkentaro/gdown/raw/main/assets/python.png\" width=\"80%\"\u003e\n\u003c/div\u003e\n\n## Why?\n\nDownloading public files from Google Drive with curl or wget doesn't work —\nGoogle serves a confirmation page for large files, and the URL formats are a mess.\n\ngdown gets around that:\n\n- Skips the virus-scan confirmation page so large downloads actually finish\n- Downloads folders recursively\n- Exports Google Docs/Sheets/Slides as PDF, DOCX, CSV, etc.\n- Resumes partial downloads with `--continue`\n- Also works with plain HTTP/HTTPS URLs as a curl/wget replacement\n\n## Install\n\nRequires Python 3.10 or later.\n\n```bash\npip install gdown\n```\n\nOr with [uv](https://docs.astral.sh/uv/):\n\n```bash\nuv tool install gdown\n```\n\n## Quick start\n\n```bash\n# Just paste a Google Drive URL\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\n\n# Or copy-paste a share link directly\ngdown 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing'\n```\n\n## Usage\n\n### CLI\n\n#### Files\n\n```bash\n# Download by URL\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\n\n# Download by file ID\ngdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\n\n# Download from a share link\ngdown 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing'\n\n# Save to a specific path\ngdown https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c -O /tmp/spam.txt\n\n# Resolve the filename (with its real extension) without downloading\ngdown https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c --json\n```\n\n`--json` is in beta and its output format may change in a future release; pass\n`--quiet` to silence the beta warning in scripts. The output is an array of\n`{url, path}` entries, where `path` is the filename Google Drive reports. This\nlets you choose a name while keeping the original extension:\n\n```bash\nurl=\"https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c\"\nfilename=$(gdown \"$url\" --json | jq -r '.[0].path')\ngdown \"$url\" -O \"my_name.${filename##*.}\"\n```\n\n#### Folders\n\n```bash\n# Download an entire folder\ngdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder\n\n# List folder contents as a JSON array (each entry has url and path)\ngdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl --json\n\n# Filter by path and download matches\ngdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl --json \\\n  | jq -r '.[] | select(.path | test(\"shad\")) | .url' \\\n  | xargs -n1 gdown\n```\n\nFolder URLs are detected automatically. A bare folder ID still requires\n`--folder` because file and folder IDs have the same format.\n\n#### Google Docs, Sheets, Slides\n\n```bash\n# Download a Google Slides file (default: pptx)\ngdown \"https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit?usp=sharing\"\n\n# Export as PDF instead\ngdown \"https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit\" --format pdf\n```\n\nDefault export formats: Docs → `docx`, Sheets → `xlsx`, Slides → `pptx`.\n\n#### Resume, speed limit, proxy\n\n```bash\n# Resume a partially downloaded file\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --continue\n\n# Limit download speed\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --speed 10MB\n\n# Download via proxy\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --proxy http://proxy:8080\n\n# Give up when the server sends nothing for 30 seconds\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --timeout 30\n```\n\n#### Other options\n\n```bash\n# Skip TLS certificate verification\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --no-check-certificate\n\n# Download as your signed-in Google account, reusing your browser's cookies\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --cookies-from-browser firefox\n\n# Read and save cookies in a file other than ~/.cache/gdown/cookies.txt\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --cookies ./cookies.txt\n\n# Don't read or save cookies\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --no-cookies\n\n# Use a custom User-Agent\ngdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ --user-agent \"MyApp/1.0\"\n```\n\n#### Pipe to stdout\n\n```bash\ngdown https://github.com/wkentaro/gdown/archive/refs/tags/v4.0.0.tar.gz -O - --quiet | tar zxvf -\n```\n\n#### Any URL\n\ngdown also works with regular URLs, not just Google Drive:\n\n```bash\ngdown https://httpbin.org/ip -O ip.json\n```\n\n\u003e [!NOTE]\n\u003e For Google Drive URLs, gdown automatically extracts the file ID and downloads\n\u003e the actual file. Use curl or wget to download the raw HTML page instead.\n\n### Python\n\n```python\nimport gdown\n\n# Download a file\nurl = \"https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\"\ngdown.download(url=url, output=\"fcn8s_from_caffe.npz\")\n\n# Download by file ID\ngdown.download(id=\"0B9P1L--7Wd2vNm9zMTJWOGxobkU\", output=\"output.npz\")\n\n# Download from a share link\nurl = \"https://drive.google.com/file/d/0B9P1L--7Wd2vNm9zMTJWOGxobkU/view?usp=sharing\"\ngdown.download(url=url, output=\"output.npz\")\n\n# Download with hash verification and caching\ngdown.cached_download(\n    url=url,\n    path=\"output.npz\",\n    hash=\"md5:fa837a88f0c40c513d975104edf3da17\",\n    postprocess=gdown.extractall,\n)\n\n# Track download progress\ndef on_progress(bytes_so_far: int, bytes_total: int | None) -\u003e None:\n    if bytes_total is not None:\n        print(f\"\\r{bytes_so_far / bytes_total * 100:.1f}%\", end=\"\")\n\ngdown.download(url=url, output=\"output.npz\", quiet=True, progress=on_progress)\n\n# Download a folder\nurl = \"https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl\"\ngdown.download_folder(url=url)\n\n# Download a folder by ID\ngdown.download_folder(id=\"15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl\")\n```\n\n## FAQ\n\n### \"Permission Denied\" error\n\nMake sure the file sharing is set to \"Anyone with the link\".\n\n### Download still fails even with \"Anyone with the link\"\n\nGoogle throttles downloads when too many people access the same file, but\nlets a signed-in account through. If you can still open the file in your\nbrowser, reuse that browser's cookies:\n\n```bash\ngdown --cookies-from-browser firefox https://drive.google.com/uc?id=FILE_ID\n```\n\nSupported browsers: brave, chrome, chromium, edge, firefox, opera, safari,\nvivaldi, whale. gdown saves the cookies to\n`~/.cache/gdown/cookies.txt`, so later runs need no flag. That file then\nholds your whole google.com session, Gmail and Account included, so treat\nit like a password. To revoke it, delete the file and sign out of Google in\nthat browser.\n\nPlatform notes:\n\n- Linux Chromium-family browsers using GNOME Keyring require `secretstorage`\n  in gdown's Python environment. Install with `pip install 'gdown[secretstorage]'`\n  or run `uvx --from 'gdown[secretstorage]' gdown --cookies-from-browser chrome URL`.\n  Firefox needs no extra dependency.\n- macOS asks for your login password once to unlock the Chromium-family\n  keychain entry; Firefox needs nothing.\n- Windows Chrome 127+ encrypts cookies so other programs cannot read them.\n  Use Firefox there.\n- Safari requires Full Disk Access for your terminal.\n\nIf none of that works, export a Netscape `cookies.txt` with a browser\nextension such as [Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)\nand pass it with `--cookies cookies.txt`. gdown rewrites that file while\nresolving each Google Drive file, whether or not it downloads it.\n\n### Download stops after ~1 hour\n\nGoogle Drive terminates connections after approximately 1 hour for large files.\nUse `--continue` to reuse earlier partial downloads and skip completed files.\nAdd `--retries N` for up to N automatic retries per file after a transient\nconnection failure, timeout, or incomplete transfer:\n\n```bash\ngdown --continue --retries 3 https://drive.google.com/uc?id=\u003cfile_id\u003e\ngdown --continue --retries 3 https://drive.google.com/drive/folders/\u003cfolder_id\u003e\n```\n\nRetries default to zero and use exponential backoff with jitter, capped at 30\nseconds. Retries resume the current transfer automatically; `--continue` controls\nwhether earlier downloads are reused. Python callers can pass `retries=3` to\n`download`, `download_folder`, or `cached_download`.\n\nRetries require a filesystem destination; stdout and file-like outputs are not\nsupported. Folder discovery and `--json` do not retry. If a server refuses the\nrequested byte range, gdown stops that file and preserves the partial download.\nWhen a file exhausts its retries in a folder, remaining files are attempted and\nfailures are reported at the end. Permission/quota errors and cancellation are\nnot retried.\n\n### Can I use gdown for non-Google-Drive URLs?\n\nYes. It works with any public HTTP/HTTPS URL.\n\n## Contributing\n\nInstall [just](https://just.systems/man/en/packages.html) 1.58.0 or newer and\n[uv](https://docs.astral.sh/uv/getting-started/installation/). Recipes use Bash;\non Windows, install Git for Windows and make its Bash available on `PATH`.\n\n```bash\ngit clone https://github.com/wkentaro/gdown.git\ncd gdown\njust setup   # install dependencies\njust test    # run tests\njust lint    # run linters\n```\n\n## License\n\nMIT ([LICENSE](https://github.com/wkentaro/gdown/blob/main/LICENSE))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentaro%2Fgdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkentaro%2Fgdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentaro%2Fgdown/lists"}