Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

gallery-dl

БесплатноБез исполняемых скриптовНе проверен

Download images and media galleries from websites with gallery-dl. Use when a user asks to download images from Instagram, Twitter/X, Reddit, Pixiv…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

gallery-dl

Overview

gallery-dl is a command-line tool for downloading image galleries and collections from over 100 websites — including Instagram, Twitter/X, Reddit, Pixiv, DeviantArt, Tumblr, Flickr, ArtStation, Imgur, and dozens of image boards. It handles authentication, pagination, metadata extraction, and flexible file naming. Think of it as yt-dlp but for images and galleries.

Instructions

Step 1: Installation

# pip (recommended); needs Python 3.8+
pip install gallery-dl

# macOS / Linux with Homebrew
brew install gallery-dl

# Update
pip install -U gallery-dl

# Verify
gallery-dl --version

A standalone gallery-dl.bin is attached to each release at https://codeberg.org/mikf/gallery-dl/releases (the project's home; the GitHub mirror redirects there). Download it together with SHA256SUMS, run sha256sum -c --ignore-missing SHA256SUMS, then chmod +x it. Video support through yt-dlp is automatic when yt-dlp is installed in the same environment.

Step 2: Basic Downloads

# Download from a gallery/post URL
gallery-dl "https://www.instagram.com/p/C8aBcDeFgHi/"
gallery-dl "https://www.reddit.com/r/EarthPorn/top/?t=month"
gallery-dl "https://www.pixiv.net/en/artworks/100000000"
gallery-dl "https://imgur.com/a/k3TpL9x"

# Download entire user profile
gallery-dl "https://www.instagram.com/natgeo/"
gallery-dl "https://x.com/nasa/media"
gallery-dl "https://www.deviantart.com/sakimichan"
gallery-dl "https://www.pixiv.net/en/users/11"

# Download into ./downloads (gallery-dl adds its own category folders below it)
gallery-dl -d ./downloads "https://imgur.com/a/k3TpL9x"

# Verbose output; list available keywords for templates and filters
gallery-dl -v "https://imgur.com/a/k3TpL9x"
gallery-dl -K "https://imgur.com/a/k3TpL9x"

Step 3: Output Templates and Organization

gallery-dl uses a powerful template system for organizing downloaded files into directories.

# Custom filename template (-f is short for the filename option)
gallery-dl -f "{category}_{id}_{title}.{extension}" "https://imgur.com/a/k3TpL9x"

# Directory layout: the value of -o is parsed as JSON, so use double quotes inside single quotes
gallery-dl -o 'directory=["{category}", "{subcategory}"]' "https://imgur.com/a/k3TpL9x"

# Several options at once
gallery-dl -d ./media -o 'directory=["{category}", "{user}", "{date:%Y-%m}"]' "https://www.deviantart.com/sakimichan"

Single quotes inside the list (['{category}']) are not JSON and make gallery-dl fail with Single '{' encountered in format string.

Default directory structure: ./gallery-dl/{category}/{subcategory}/

Step 4: Authentication

Many sites require login for full access (age-restricted content, private profiles, higher rate limits).

# Username + password (prefer a config file or --netrc over typing a password on the command line)
gallery-dl -u "$PIXIV_USER" -p "$PIXIV_PASSWORD" "https://www.pixiv.net/en/users/11"

# Cookie-based authentication (recommended for most sites)
# Export cookies from your browser using a browser extension (e.g., "Get cookies.txt")
gallery-dl --cookies cookies.txt "https://www.instagram.com/natgeo/"

# Browser cookie extraction (auto-extracts from installed browser)
gallery-dl --cookies-from-browser firefox "https://x.com/nasa/media"
gallery-dl --cookies-from-browser chrome "https://x.com/nasa/media"

# OAuth (for Tumblr, DeviantArt, Reddit, etc.)
gallery-dl oauth:reddit          # prints an authorization URL, then saves the token
gallery-dl oauth:deviantart
gallery-dl oauth:tumblr   # also: oauth:flickr, oauth:smugmug, oauth:pixiv, oauth:mastodon:<instance>

Step 5: Filtering and Selection

# Use -K on a URL to see the keys a filter can use (they differ per site)
gallery-dl -K "https://www.reddit.com/r/EarthPorn/top/?t=year"

# Only images, only large ones (--filter keys are the filename-specific ones from -K)
gallery-dl --filter "extension in ('jpg', 'jpeg', 'png', 'gif', 'webp') and width >= 1920 and height >= 1080" "https://www.reddit.com/r/EarthPorn/top/?t=year"

# Date window on posts (ISO date or Unix timestamp); older posts end the run for date-ordered feeds
gallery-dl --date-after 2025-01-01 --date-before 2026-01-01 "https://www.deviantart.com/sakimichan"

# Size limits
gallery-dl --filesize-min 500k --filesize-max 20M "https://imgur.com/a/k3TpL9x"

# Limit which files are downloaded
gallery-dl --range "1-50" "https://imgur.com/a/k3TpL9x"     # first 50 files
gallery-dl --range "10-20" "https://imgur.com/a/k3TpL9x"    # files 10 through 20

# Stop a feed after 3 files in a row were already downloaded
gallery-dl -A 3 --download-archive archive.sqlite3 "https://x.com/nasa/media"

# Overwrite existing files (default: skip)
gallery-dl --no-skip "https://imgur.com/a/k3TpL9x"

Step 6: Configuration File

gallery-dl supports a JSON configuration file at ~/.config/gallery-dl/config.json (or ~/.gallery-dl.conf; gallery-dl --config-status lists the paths

Полный SKILL.md на GitHub

Установить gallery-dl в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл gallery-dl?

Download images and media galleries from websites with gallery-dl. Use when a user asks to download images from Instagram, Twitter/X, Reddit, Pixiv, DeviantArt, Danbooru, Tumblr, Flickr, ArtStation, or other image hosting sites, bulk download image galleries, archive artist portfolios, scrape images with metadata, download from image boards, save entire user profiles or tagged collections, or build image dataset pipelines.

Как установить скилл gallery-dl?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл gallery-dl запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить gallery-dl с