{"id":13448174,"url":"https://github.com/mikf/gallery-dl","last_synced_at":"2026-01-31T11:07:38.500Z","repository":{"id":21807178,"uuid":"25129800","full_name":"mikf/gallery-dl","owner":"mikf","description":"Command-line program to download image galleries and collections from several image hosting sites","archived":false,"fork":false,"pushed_at":"2025-05-13T09:52:44.000Z","size":13999,"stargazers_count":13569,"open_issues_count":1216,"forks_count":1077,"subscribers_count":153,"default_branch":"master","last_synced_at":"2025-05-13T10:44:43.292Z","etag":null,"topics":["danbooru","deviantart","downloader","flickr","gallery","kemono","mangadex","pixiv","tumblr","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikf.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/supportedsites.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"ko_fi":"mikefaehrmann","custom":"https://www.paypal.me/mikefaehrmann"}},"created_at":"2014-10-12T19:38:05.000Z","updated_at":"2025-05-13T10:01:21.000Z","dependencies_parsed_at":"2023-01-16T21:00:54.455Z","dependency_job_id":"b079e8c9-5e6d-42cd-9eda-4a7546e5ccc7","html_url":"https://github.com/mikf/gallery-dl","commit_stats":{"total_commits":5410,"total_committers":128,"mean_commits":42.265625,"dds":0.07264325323475052,"last_synced_commit":"3ec7ee6baa8103163e437d077f3ebb734e598cda"},"previous_names":[],"tags_count":177,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikf%2Fgallery-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikf%2Fgallery-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikf%2Fgallery-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikf%2Fgallery-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikf","download_url":"https://codeload.github.com/mikf/gallery-dl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253929077,"owners_count":21985796,"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":["danbooru","deviantart","downloader","flickr","gallery","kemono","mangadex","pixiv","tumblr","twitter"],"created_at":"2024-07-31T05:01:37.749Z","updated_at":"2026-01-31T11:07:38.492Z","avatar_url":"https://github.com/mikf.png","language":"Python","readme":"==========\ngallery-dl\n==========\n\n*gallery-dl* is a command-line program\nto download image galleries and collections\nfrom several image hosting sites\n(see `Supported Sites \u003cdocs/supportedsites.md\u003e`__).\nIt is a cross-platform tool\nwith many `configuration options \u003chttps://gdl-org.github.io/docs/configuration.html\u003e`__\nand powerful `filenaming capabilities \u003chttps://gdl-org.github.io/docs/formatting.html\u003e`__.\n\n\n|pypi| |discord| |build|\n\n.. contents::\n\n\nDependencies\n============\n\n- Python_ 3.8+\n- Requests_\n\nOptional\n--------\n\n- yt-dlp_ or youtube-dl_: HLS/DASH video downloads, ``ytdl`` integration\n- FFmpeg_: Pixiv Ugoira conversion\n- mkvmerge_: Accurate Ugoira frame timecodes\n- PySocks_: SOCKS proxy support\n- brotli_ or brotlicffi_: Brotli compression support\n- zstandard_: Zstandard compression support\n- PyYAML_: YAML configuration file support\n- toml_: TOML configuration file support for Python\u003c3.11\n- SecretStorage_: GNOME keyring passwords for ``--cookies-from-browser``\n- Psycopg_: PostgreSQL archive support\n- truststore_: Native system certificate support\n- Jinja_: Jinja template support\n\n\nInstallation\n============\n\n\nPip\n---\n\nThe stable releases of *gallery-dl* are distributed on PyPI_ and can be\neasily installed or upgraded using pip_:\n\n.. code:: bash\n\n    python3 -m pip install -U gallery-dl\n\nInstalling the latest dev version directly from GitHub can be done with\npip_ as well:\n\n.. code:: bash\n\n    python3 -m pip install -U --force-reinstall --no-deps https://github.com/mikf/gallery-dl/archive/master.tar.gz\n\nOmit :code:`--no-deps` if Requests_ hasn't been installed yet.\n\nNote: Windows users should use :code:`py -3` instead of :code:`python3`.\n\nIt is advised to use the latest version of pip_,\nincluding the essential packages :code:`setuptools` and :code:`wheel`.\nTo ensure these packages are up-to-date, run\n\n.. code:: bash\n\n    python3 -m pip install --upgrade pip setuptools wheel\n\n\nStandalone Executable\n---------------------\n\nPrebuilt executable files with a Python interpreter and\nrequired Python packages included are available for\n\n- `Windows \u003chttps://github.com/mikf/gallery-dl/releases/download/v1.31.5/gallery-dl.exe\u003e`__\n  (Requires `Microsoft Visual C++ Redistributable Package (x86) \u003chttps://aka.ms/vs/17/release/vc_redist.x86.exe\u003e`__)\n- `Linux   \u003chttps://github.com/mikf/gallery-dl/releases/download/v1.31.5/gallery-dl.bin\u003e`__\n\n\nNightly Builds\n--------------\n\n| Executables build from the latest commit can be found at\n| https://github.com/gdl-org/builds/releases\n\n\nSnap\n----\n\nLinux users that are using a distro that is supported by Snapd_ can install *gallery-dl* from the Snap Store:\n\n.. code:: bash\n\n    snap install gallery-dl\n\n\nChocolatey\n----------\n\nWindows users that have Chocolatey_ installed can install *gallery-dl* from the Chocolatey Community Packages repository:\n\n.. code:: powershell\n\n    choco install gallery-dl\n\n\nScoop\n-----\n\n*gallery-dl* is also available in the Scoop_ \"main\" bucket for Windows users:\n\n.. code:: powershell\n\n    scoop install gallery-dl\n\nHomebrew\n--------\n\nFor macOS or Linux users using Homebrew:\n\n.. code:: bash\n\n    brew install gallery-dl\n\nMacPorts\n--------\n\nFor macOS users with MacPorts:\n\n.. code:: bash\n\n    sudo port install gallery-dl\n\nDocker\n--------\nUsing the Dockerfile in the repository:\n\n.. code:: bash\n\n    git clone https://github.com/mikf/gallery-dl.git\n    cd gallery-dl/\n    docker build -t gallery-dl:latest .\n\nPulling image from `Docker Hub \u003chttps://hub.docker.com/r/mikf123/gallery-dl\u003e`__:\n\n.. code:: bash\n\n    docker pull mikf123/gallery-dl\n    docker tag mikf123/gallery-dl gallery-dl\n\nPulling image from `GitHub Container Registry \u003chttps://github.com/mikf/gallery-dl/pkgs/container/gallery-dl\u003e`__:\n\n.. code:: bash\n\n    docker pull ghcr.io/mikf/gallery-dl\n    docker tag ghcr.io/mikf/gallery-dl gallery-dl\n\nPulling *Nightly Build* images built from the latest commit by using the ``dev`` tag:\n\n.. code:: bash\n\n    docker pull mikf123/gallery-dl:dev\n    docker pull ghcr.io/mikf/gallery-dl:dev\n\nTo run the container you will probably want to attach some directories on the host so that the config file and downloads can persist across runs.\n\nMake sure to either download the example config file reference in the repo and place it in the mounted volume location or touch an empty file there.\n\nIf you gave the container a different tag or are using podman then make sure you adjust.  Run ``docker image ls`` to check the name if you are not sure.\n\nThis will remove the container after every use so you will always have a fresh environment for it to run. If you setup a ci-cd pipeline to autobuild the container you can also add a ``--pull=newer`` flag so that when you run it docker will check to see if there is a newer container and download it before running.\n\n.. code:: bash\n\n    docker run --rm  -v $HOME/Downloads/:/gallery-dl/ -v $HOME/.config/gallery-dl/gallery-dl.conf:/etc/gallery-dl.conf -it gallery-dl:latest\n\nYou can also add an alias to your shell for \"gallery-dl\" or create a simple bash script and drop it somewhere in your $PATH to act as a shim for this command.\n\nNix and Home Manager\n--------------------------\n\nAdding *gallery-dl* to your system environment:\n\n.. code:: nix\n\n    environment.systemPackages = with pkgs; [\n      gallery-dl\n    ];\n\nUsing :code:`nix-shell`\n\n.. code:: bash\n\n    nix-shell -p gallery-dl\n\n.. code:: bash\n\n    nix-shell -p gallery-dl --run \"gallery-dl \u003cargs\u003e\"\n\nFor Home Manager users, you can manage *gallery-dl* declaratively:\n\n.. code:: nix\n\n    programs.gallery-dl = {\n      enable = true;\n      settings = {\n        extractor.base-directory = \"~/Downloads\";\n      };\n    };\n\nAlternatively, you can just add it to :code:`home.packages` if you don't want to manage it declaratively:\n\n.. code:: nix\n\n    home.packages = with pkgs; [\n      gallery-dl\n    ];\n\nAfter making these changes, simply rebuild your configuration and open a new shell to have *gallery-dl* available.\n\nUsage\n=====\n\nTo use *gallery-dl* simply call it with the URLs you wish to download images\nfrom:\n\n.. code:: bash\n\n    gallery-dl [OPTIONS]... URLS...\n\nUse :code:`gallery-dl --help` or see `\u003cdocs/options.md\u003e`__\nfor a full list of all command-line options.\n\n\nExamples\n--------\n\nDownload images; in this case from danbooru via tag search for 'bonocho':\n\n.. code:: bash\n\n    gallery-dl \"https://danbooru.donmai.us/posts?tags=bonocho\"\n\n\nGet the direct URL of an image from a site supporting authentication with username \u0026 password:\n\n.. code:: bash\n\n    gallery-dl -g -u \"\u003cusername\u003e\" -p \"\u003cpassword\u003e\" \"https://twitter.com/i/web/status/604341487988576256\"\n\n\nFilter manga chapters by chapter number and language:\n\n.. code:: bash\n\n    gallery-dl --chapter-filter \"10 \u003c= chapter \u003c 20\" -o \"lang=fr\" \"https://mangadex.org/title/59793dd0-a2d8-41a2-9758-8197287a8539\"\n\n\n| Search a remote resource for URLs and download images from them:\n| (URLs for which no extractor can be found will be silently ignored)\n\n.. code:: bash\n\n    gallery-dl \"r:https://pastebin.com/raw/FLwrCYsT\"\n\n\nIf a site's address is nonstandard for its extractor, you can prefix the URL with the\nextractor's name to force the use of a specific extractor:\n\n.. code:: bash\n\n    gallery-dl \"tumblr:https://sometumblrblog.example\"\n\n\nConfiguration\n=============\n\nConfiguration files for *gallery-dl* use a JSON-based file format.\n\n\nDocumentation\n-------------\n\nA list of all available configuration options and their descriptions\ncan be found at `\u003chttps://gdl-org.github.io/docs/configuration.html\u003e`__.\n\n| For a default configuration file with available options set to their\n  default values, see `\u003cdocs/gallery-dl.conf\u003e`__.\n\n| For a commented example with more involved settings and option usage,\n  see `\u003cdocs/gallery-dl-example.conf\u003e`__.\n\n\nLocations\n---------\n\n*gallery-dl* searches for configuration files in the following places:\n\nWindows:\n    * ``%APPDATA%\\gallery-dl\\config.json``\n    * ``%USERPROFILE%\\gallery-dl\\config.json``\n    * ``%USERPROFILE%\\gallery-dl.conf``\n\n    (``%USERPROFILE%`` usually refers to a user's home directory,\n    i.e. ``C:\\Users\\\u003cusername\u003e\\``)\n\nLinux, macOS, etc.:\n    * ``/etc/gallery-dl.conf``\n    * ``${XDG_CONFIG_HOME}/gallery-dl/config.json``\n    * ``${HOME}/.config/gallery-dl/config.json``\n    * ``${HOME}/.gallery-dl.conf``\n\nWhen run as `executable \u003cStandalone Executable_\u003e`__,\n*gallery-dl* will also look for a ``gallery-dl.conf`` file\nin the same directory as said executable.\n\nIt is possible to use more than one configuration file at a time.\nIn this case, any values from files after the first will get merged\ninto the already loaded settings and potentially override previous ones.\n\n\nAuthentication\n==============\n\nUsername \u0026 Password\n-------------------\n\nSome extractors require you to provide valid login credentials in the form of\na username \u0026 password pair. This is necessary for\n``nijie``\nand optional for\n``aryion``,\n``danbooru``,\n``e621``,\n``exhentai``,\n``idolcomplex``,\n``imgbb``,\n``inkbunny``,\n``mangadex``,\n``mangoxo``,\n``pillowfort``,\n``sankaku``,\n``subscribestar``,\n``tapas``,\n``tsumino``,\n``twitter``,\nand ``zerochan``.\n\nYou can set the necessary information in your\n`configuration file \u003cConfiguration_\u003e`__\n\n.. code:: json\n\n    {\n        \"extractor\": {\n            \"twitter\": {\n                \"username\": \"\u003cusername\u003e\",\n                \"password\": \"\u003cpassword\u003e\"\n            }\n        }\n    }\n\nor you can provide them directly via the\n:code:`-u/--username` and :code:`-p/--password` or via the\n:code:`-o/--option` command-line options\n\n.. code:: bash\n\n    gallery-dl -u \"\u003cusername\u003e\" -p \"\u003cpassword\u003e\" \"URL\"\n    gallery-dl -o \"username=\u003cusername\u003e\" -o \"password=\u003cpassword\u003e\" \"URL\"\n\n\nCookies\n-------\n\nFor sites where login with username \u0026 password is not possible due to\nCAPTCHA or similar, or has not been implemented yet, you can use the\ncookies from a browser login session and input them into *gallery-dl*.\n\nThis can be done via the\n`cookies \u003chttps://gdl-org.github.io/docs/configuration.html#extractor-cookies\u003e`__\noption in your configuration file by specifying\n\n- | the path to a Mozilla/Netscape format cookies.txt file exported by a browser addon\n  | (e.g. `Get cookies.txt LOCALLY \u003chttps://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc\u003e`__ for Chrome,\n    `Export Cookies \u003chttps://addons.mozilla.org/en-US/firefox/addon/export-cookies-txt/\u003e`__ for Firefox)\n\n- | a list of name-value pairs gathered from your browser's web developer tools\n  | (in `Chrome \u003chttps://developers.google.com/web/tools/chrome-devtools/storage/cookies\u003e`__,\n     in `Firefox \u003chttps://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector\u003e`__)\n\n- | the name of a browser to extract cookies from\n  | (supported browsers are Chromium-based ones, Firefox, and Safari)\n\nFor example:\n\n.. code:: json\n\n    {\n        \"extractor\": {\n            \"instagram\": {\n                \"cookies\": \"$HOME/path/to/cookies.txt\"\n            },\n            \"patreon\": {\n                \"cookies\": {\n                    \"session_id\": \"K1T57EKu19TR49C51CDjOJoXNQLF7VbdVOiBrC9ye0a\"\n                }\n            },\n            \"twitter\": {\n                \"cookies\": [\"firefox\"]\n            }\n        }\n    }\n\n| You can also specify a cookies.txt file with\n  the :code:`--cookies` command-line option\n| or a browser to extract cookies from with :code:`--cookies-from-browser`:\n\n.. code:: bash\n\n    gallery-dl --cookies \"$HOME/path/to/cookies.txt\" \"URL\"\n    gallery-dl --cookies-from-browser firefox \"URL\"\n\n\nOAuth\n-----\n\n*gallery-dl* supports user authentication via OAuth_ for some extractors.\nThis is necessary for\n``pixiv``\nand optional for\n``deviantart``,\n``flickr``,\n``reddit``,\n``smugmug``,\n``tumblr``,\nand ``mastodon`` instances.\n\nLinking your account to *gallery-dl* grants it the ability to issue requests\non your account's behalf and enables it to access resources which would\notherwise be unavailable to a public user.\n\nTo do so, start by invoking it with ``oauth:\u003csitename\u003e`` as an argument.\nFor example:\n\n.. code:: bash\n\n    gallery-dl oauth:flickr\n\nYou will be sent to the site's authorization page and asked to grant read\naccess to *gallery-dl*. Authorize it and you will be shown one or more\n\"tokens\", which should be added to your configuration file.\n\nTo authenticate with a ``mastodon`` instance, run *gallery-dl* with\n``oauth:mastodon:\u003cinstance\u003e`` as argument. For example:\n\n.. code:: bash\n\n    gallery-dl oauth:mastodon:pawoo.net\n    gallery-dl oauth:mastodon:https://mastodon.social/\n\n\n.. _Python:     https://www.python.org/downloads/\n.. _PyPI:       https://pypi.org/\n.. _pip:        https://pip.pypa.io/en/stable/\n.. _Requests:   https://requests.readthedocs.io/en/latest/\n.. _FFmpeg:     https://www.ffmpeg.org/\n.. _mkvmerge:   https://www.matroska.org/downloads/mkvtoolnix.html\n.. _yt-dlp:     https://github.com/yt-dlp/yt-dlp\n.. _youtube-dl: https://ytdl-org.github.io/youtube-dl/\n.. _PySocks:    https://pypi.org/project/PySocks/\n.. _brotli:     https://github.com/google/brotli\n.. _brotlicffi: https://github.com/python-hyper/brotlicffi\n.. _zstandard:  https://github.com/indygreg/python-zstandard\n.. _PyYAML:     https://pyyaml.org/\n.. _toml:       https://pypi.org/project/toml/\n.. _SecretStorage: https://pypi.org/project/SecretStorage/\n.. _Psycopg:    https://www.psycopg.org/\n.. _truststore: https://truststore.readthedocs.io/en/latest/\n.. _Jinja:      https://jinja.palletsprojects.com/\n.. _Snapd:      https://docs.snapcraft.io/installing-snapd\n.. _OAuth:      https://en.wikipedia.org/wiki/OAuth\n.. _Chocolatey: https://chocolatey.org/install\n.. _Scoop:      https://scoop.sh/\n\n.. |pypi| image:: https://img.shields.io/pypi/v/gallery-dl?logo=pypi\u0026label=PyPI\n    :target: https://pypi.org/project/gallery-dl/\n\n.. |build| image:: https://github.com/mikf/gallery-dl/workflows/tests/badge.svg\n    :target: https://github.com/mikf/gallery-dl/actions\n\n.. |gitter| image:: https://badges.gitter.im/gallery-dl/main.svg\n    :target: https://gitter.im/gallery-dl/main\n\n.. |discord| image:: https://img.shields.io/discord/1067148002722062416?logo=discord\u0026label=Discord\u0026color=blue\n    :target: https://discord.gg/rSzQwRvGnE\n","funding_links":["https://ko-fi.com/mikefaehrmann","https://www.paypal.me/mikefaehrmann"],"categories":["Python","Quick reference","Media","[mikf/gallery-dl](https://github.com/mikf/gallery-dl)","Command Line Utilities","🎬 Media Downloaders","**(NOT THE OFFICIAL AWESOME LIST)**","Viewing images","Download utilities","Downloaders","twitter","[](#table-of-contents) Table of contents","Recently Updated","Third-party Web APIs","\u003ca name=\"transfer\"\u003e\u003c/a\u003eData transfer","Command Line Tools","HarmonyOS"],"sub_categories":["Utils","Internet","Ruby","Application-specific","[](#universal)Universal","Others","[May 05, 2025](/content/2025/05/05/README.md)","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikf%2Fgallery-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikf%2Fgallery-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikf%2Fgallery-dl/lists"}