mikf/gallery-dl
Productivity & UtilitiesCommand-line downloader for image galleries and collections on many image hosting sites.
What it does
gallery-dl is a Python command-line tool that downloads image galleries and collections from a wide range of image hosting sites. Individual sites are handled by "extractors", so you pass a page or search URL and the tool resolves the post list, fetches the files, and stores them locally. It supports many command-line options, JSON-based configuration, and filename templating via format strings.
It fits people who want repeatable, scriptable archiving of galleries rather than clicking through a browser: artists, archivists, researchers, and users backing up their own posts.
Install and first run
Requires Python 3.8+ and the Requests library. The simplest installation is from PyPI:
python -m pip install -U gallery-dl
Windows users should call py instead of python.
Then download a gallery by passing its URL. For example, a Danbooru tag search:
gallery-dl "https://danbooru.donmai.us/posts?tags=bonocho"
The files are written to the current directory using the default naming scheme. gallery-dl --help lists all options. If a site's URL is nonstandard, prefix it with the extractor name to force the right handler, e.g. tumblr:https://sometumblrblog.example.
Access and authentication
Sites with required or optional login can receive a username and password through -u/-p, -o, or the config file. Where password login is unavailable, use browser cookies via the cookies option, --cookies, or --cookies-from-browser. Some sites (Pixiv, DeviantArt, Flickr, Reddit, Tumblr, Mastodon and others) support OAuth; run for example gallery-dl oauth:flickr and follow the authorization flow.
Other installation paths
Prebuilt executables exist for Windows and Linux, plus nightly builds. Linux users can use Snap or Homebrew; Windows users can use Chocolatey or Scoop; macOS users have Homebrew and MacPorts. Docker images are on Docker Hub and the GitHub Container Registry; when running the container, mount a config file and a download directory so both persist.
Constraints
- Requires Python 3.8+ and Requests; optional features add dependencies such as yt-dlp for HLS/DASH video, FFmpeg for Pixiv Ugoira conversion, PySocks for SOCKS proxies, and PyYAML/TOML for those config formats.
- Configuration file search paths differ by OS; multiple config files are merged, with later files overriding earlier values.
- Sites enforce rate limits and bot detection; using your own account can lead to bans.
- Downloading content may conflict with site terms and copyright; users are responsible for how they use it.
- Active development has moved to Codeberg; see the announcement. The GitHub repository is GPL-2.0 licensed.
HotRepo's take
There is no recorded GitHub daily rank or star-growth snapshot for this repository in HotRepo data. The useful signal is the historical Hacker News discussion: a 2020 thread drew 407 points and 65 comments around the tool's downloader role and its maintainability, including criticism about modularization (discussion). A 2026 thread (201 points, 61 comments) covered the move off GitHub after a DMCA notice, with commenters debating copyright and the notice itself; the FAKKU CEO stated in that thread that a third-party agent sent the notice without approval (comment). For readers, the practical takeaway is that the project has a long track record and an active community, but development now continues on Codeberg rather than here.
Written by AI from the project's README, updated . The project's own docs are the source of truth.