{"id":13469201,"url":"https://github.com/wkentaro/gdown","last_synced_at":"2025-04-23T20:48:08.324Z","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":"2024-08-12T16:54:10.000Z","size":1112,"stargazers_count":4575,"open_issues_count":49,"forks_count":363,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-04-08T08:11:12.120Z","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":".github/FUNDING.yml","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},"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":"2025-04-07T13:34:02.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":92,"template":false,"template_full_name":null,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513676,"owners_count":21443204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-04-23T20:48:08.307Z","avatar_url":"https://github.com/wkentaro.png","language":"Python","funding_links":["https://github.com/sponsors/wkentaro"],"categories":["Python","Data Loading \u0026 Extraction","Data Format \u0026 I/O","[](#table-of-contents) Table of contents","python"],"sub_categories":["For Python","[](#universal)Universal"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003egdown\u003c/h1\u003e\n  \u003cp\u003e\u003cb\u003eGoogle Drive Public File Downloader when Curl/Wget Fails\u003c/b\u003e\u003c/p\u003e\n  \u003cimg src=\"https://github.com/wkentaro/gdown/raw/main/.readme/cli.png\" width=\"80%\"\u003e\n  \u003cimg src=\"https://github.com/wkentaro/gdown/raw/main/.readme/python.png\" width=\"80%\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n\n*Gdown* downloads a public file/folder from Google Drive.\n\n*Gdown* provides what curl/wget doesn't for Google Drive:\n- **Skip the security notice** allowing you to download large files (curl/wget fails);\n- **Recursive download** of files in a folder (maximum 50 files per folder);\n- **Specify download file format** for Google Slides/Sheet/Docs like PDF/XML/CSV.\n\n\n## Installation\n\n\u003ca href=\"https://pypi.org/project/gdown\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/gdown.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.python.org/pypi/gdown\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/gdown.svg\"\u003e\u003c/a\u003e\n\n```bash\npip install gdown\n\n# to upgrade\npip install --upgrade gdown\n```\n\n\n## Usage\n\n### via Command Line\n\n```bash\n$ gdown --help\nusage: gdown [-h] [-V] [-O OUTPUT] [-q] [--fuzzy] [--id] [--proxy PROXY]\n             [--speed SPEED] [--no-cookies] [--no-check-certificate]\n             [--continue] [--folder] [--remaining-ok]\n             url_or_id\n...\n\n$ # a large file (~500MB)\n$ gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\n$ md5sum fcn8s_from_caffe.npz\n256c2a8235c1c65e62e48d3284fbd384\n\n$ # same as the above but with the file ID\n$ gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\n\n$ # a small file\n$ gdown https://drive.google.com/uc?id=0B9P1L--7Wd2vU3VUVlFnbTgtS2c\n$ cat spam.txt\nspam\n\n$ # download with fuzzy extraction of a file ID\n$ gdown --fuzzy 'https://drive.google.com/file/d/0B9P1L--7Wd2vU3VUVlFnbTgtS2c/view?usp=sharing\u0026resourcekey=0-WWs_XOSctfaY_0-sJBKRSQ'\n$ cat spam.txt\nspam\n\n$ # --fuzzy option also works with Microsoft Powerpoint files\n$ gdown --fuzzy \"https://docs.google.com/presentation/d/15umvZKlsJ3094HNg5S4vJsIhxcFlyTeK/edit?usp=sharing\u0026ouid=117512221203072002113\u0026rtpof=true\u0026sd=true\"\n\n$ # a folder\n$ gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl -O /tmp/folder --folder\n\n$ # as an alternative to curl/wget\n$ gdown https://httpbin.org/ip -O ip.json\n$ cat ip.json\n{\n  \"origin\": \"126.169.213.247\"\n}\n\n$ # write stdout and pipe to extract\n$ gdown https://github.com/wkentaro/gdown/archive/refs/tags/v4.0.0.tar.gz -O - --quiet | tar zxvf -\n$ ls gdown-4.0.0/\ngdown  github2pypi  LICENSE  MANIFEST.in  pyproject.toml  README.md  setup.cfg  setup.py  tests\n```\n\n### via Python\n\n```python\nimport gdown\n\n# a file\nurl = \"https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ\"\noutput = \"fcn8s_from_caffe.npz\"\ngdown.download(url, output)\n\n# same as the above, but with the file ID\nid = \"0B9P1L--7Wd2vNm9zMTJWOGxobkU\"\ngdown.download(id=id, output=output)\n\n# same as the above, and you can copy-and-paste a URL from Google Drive with fuzzy=True\nurl = \"https://drive.google.com/file/d/0B9P1L--7Wd2vNm9zMTJWOGxobkU/view?usp=sharing\"\ngdown.download(url=url, output=output, fuzzy=True)\n\n# Cached download with identity check via MD5 (or SHA1, SHA256, etc).\n# Pass postprocess function e.g., extracting compressed file.\nmd5 = \"md5:fa837a88f0c40c513d975104edf3da17\"\ngdown.cached_download(url, output, hash=hash, postprocess=gdown.extractall)\n\n# a folder\nurl = \"https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl\"\ngdown.download_folder(url)\n\n# same as the above, but with the folder ID\nid = \"15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl\"\ngdown.download_folder(id=id)\n```\n\n\n## FAQ\n\n### I get a 'Permission Denied' error.\n\nHave you made sure you set the file permission to 'Anyone with Link'?\n\n### I set the permission 'Anyone with Link', but I still can't download.\n\nGoogle restricts access to a file when the download is concentrated.\nIf you can still access to the file from your browser, downloading cookies file might\nhelp. Follow this step: 1) download cookies.txt using browser extensions like\n([Get cookies.txt LOCALLY](https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc));\n2) mv the `cookies.txt` to `~/.cache/gdown/cookies.txt`; 3) run download again.\nIf you're using `gdown\u003e=5.0.0`, it should be able to use the cookies same as your browser.\n\n\n## License\n\nMIT\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"}