Scripts2026年5月17日·1 分钟阅读

gallery-dl — Batch Download Images and Videos from 100+ Sites

gallery-dl is a command-line tool for downloading image galleries and collections from dozens of popular hosting sites, image boards, and social media platforms.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
gallery-dl Overview
通用 CLI 安装命令
npx tokrepo install d970b67d-51c8-11f1-9bc6-00163e2b0d79

Introduction

gallery-dl is a Python-based command-line program that downloads image galleries and collections from a wide range of websites. It supports over 100 sites including social media platforms, image hosting services, and art communities, providing a unified interface for bulk media retrieval.

What gallery-dl Does

  • Downloads images, videos, and metadata from 100+ supported websites
  • Supports authentication for sites requiring login credentials
  • Applies customizable filename templates and directory structures
  • Filters downloads by date, file type, tag, or rating
  • Integrates with yt-dlp for embedded video extraction

Architecture Overview

gallery-dl is written in Python and operates as a single-process CLI tool. Each supported site has a dedicated extractor module that handles URL parsing, API communication, and pagination. Downloads pass through a configurable pipeline that applies filename formatting, metadata extraction, and optional post-processing steps. Configuration is managed via a hierarchical JSON config file.

Self-Hosting & Configuration

  • Install via pip, pipx, or your system package manager
  • Configuration lives in ~/.config/gallery-dl/config.json
  • Set per-site credentials using the username and password fields or browser cookie import
  • Customize output paths with replacement fields like {category}, {title}, {id}
  • Use --filter expressions to skip files by size, dimensions, or tags

Key Features

  • Covers a broad range of sites: Pixiv, Twitter/X, Reddit, DeviantArt, Danbooru, Tumblr, and many more
  • Writes metadata to JSON sidecar files for archival workflows
  • Supports resuming interrupted downloads with an archive database
  • Provides rate limiting and retry logic to avoid bans
  • Extensible via custom extractors and post-processors

Comparison with Similar Tools

  • yt-dlp — focused on video sites; gallery-dl covers image boards and galleries that yt-dlp does not
  • wget/curl — generic HTTP downloaders without site-specific parsing or pagination
  • Hydrus Network — a full media management application; gallery-dl is a lightweight CLI downloader
  • Imgbrd-Grabber — GUI-based booru downloader; gallery-dl is terminal-first and supports more site types

FAQ

Q: How do I download from a site that requires login? A: Add your credentials to the config file under the site's extractor section, or use --cookies-from-browser to import session cookies.

Q: Can gallery-dl skip files I have already downloaded? A: Yes. Enable the archive database with --download-archive and gallery-dl will track completed URLs.

Q: Does it support proxy or VPN connections? A: Yes. Set the proxy option in the config or pass --proxy on the command line.

Q: Is gallery-dl actively maintained? A: Yes. The project receives regular updates adding new extractors and fixing site changes.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产