# gallery-dl

> Cross-platform command-line program that downloads image galleries and collections from many image hosting sites, with configurable file naming.

Stars: 20.3k · Language: Python · License: GPL-2.0 · Categories: Network

- Repository: https://github.com/mikf/gallery-dl
- Website: https://discord.gg/rSzQwRvGnE
- Page: https://www.trmn.sh/tools/gallery-dl

## Install

- Homebrew: `brew install gallery-dl`
- pip: `python -m pip install -U gallery-dl`
- Snap: `snap install gallery-dl`

## Overview

gallery-dl is a cross-platform command-line downloader for image galleries and collections on many image hosting sites. You pass it one or more URLs (`gallery-dl [OPTIONS]... URLS...`) and a site-specific extractor fetches the images. Examples in the README include danbooru tag searches, Twitter status URLs, and MangaDex titles. It requires Python 3.8+ and Requests.

Notable capabilities include filtering, such as `--chapter-filter "10 <= chapter < 20"` combined with `-o "lang=fr"` for manga chapters. `-g` prints direct URLs instead of downloading. A `r:` prefix makes it search a remote resource for URLs and download from them. A prefix such as `tumblr:` forces a specific extractor when a site's address is nonstandard. It also has file-naming and formatting options, and a JSON-based configuration file read from several locations (for example `~/.config/gallery-dl/config.json` or `%APPDATA%\gallery-dl\config.json`). Multiple config files can be merged.

Authentication is covered in several ways: username and password (`-u`/`-p` or config), cookies from a cookies.txt file, a list of name-value pairs or a browser (`--cookies`, `--cookies-from-browser`), and OAuth for extractors such as pixiv, deviantart, flickr, reddit, smugmug, tumblr and mastodon instances. Optional dependencies add yt-dlp/youtube-dl for HLS/DASH video, FFmpeg for Pixiv Ugoira conversion, SOCKS proxy support, YAML/TOML configs, and PostgreSQL archive support.

It suits users who archive or batch-download media from image boards, social sites and manga hosts, and who want to script downloads or keep a persistent configuration. Distribution includes pip, standalone Windows and Linux executables, Snap, Chocolatey, Scoop, Homebrew, MacPorts, Docker images and Nix packages.

### Installation

```bash
# via Homebrew
brew install gallery-dl
```

```bash
# via pip
python -m pip install -U gallery-dl
```

```bash
# via Snap
snap install gallery-dl
```

## Alternatives

- [magic-wormhole](https://www.trmn.sh/tools/magic-wormhole.md): Python library and `wormhole` CLI for sending files, directories, or text between computers using short, single-use, human-pronounceable codes. (Python, 23.1k stars)
- [sshuttle](https://www.trmn.sh/tools/sshuttle.md): Transparent proxy that tunnels traffic to a remote network over ssh, acting as a VPN substitute without requiring admin access on the remote side. (Python, 13.6k stars)
- [posting](https://www.trmn.sh/tools/posting.md): Terminal-based HTTP client with keyboard navigation, local YAML storage, and syntax highlighting (Python, 12.6k stars)
- [Streamlink](https://www.trmn.sh/tools/streamlink.md): Python CLI and library that pipes video streams from services like Twitch and YouTube into a video player such as VLC, or writes them to disk. (Python, 11.9k stars)
- [BBOT](https://www.trmn.sh/tools/bbot.md): Recursive internet scanner for recon, bug bounties and ASM: subdomain enumeration, web spidering, email gathering and web scanning via presets. (Python, 10.9k stars)

---

Canonical: https://www.trmn.sh/tools/gallery-dl
