You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gallery-dl/docs/options.md

12 KiB

Command-Line Options

General Options

h help Print this help message and exit
version Print program version and exit
i inputfile FILE Download URLs found in FILE (- for stdin). More than one --input-file can be specified
d destination PATH Target location for file downloads
D directory PATH Exact location for file downloads
f filename FORMAT Filename format string for downloaded files (/O for "original" filenames)
proxy URL Use the specified proxy
sourceaddress IP Client-side IP address to bind to
useragent UA User-Agent request header
clearcache MODULE Delete cached login sessions, cookies, etc. for MODULE (ALL to delete everything)
cookies FILE File to load additional cookies from
cookiesfrombrowser BROWSER Name of the browser to load cookies from, with optional keyring name prefixed with +, profile prefixed with :, and container prefixed with :: (none for no container)

Output Options

q quiet Activate quiet mode
v verbose Print various debugging information
g geturls Print URLs instead of downloading
G resolveurls Print URLs instead of downloading; resolve intermediary URLs
j dumpjson Print JSON information
s simulate Simulate data extraction; do not download anything
E extractorinfo Print extractor defaults and settings
K listkeywords Print a list of available keywords and example values for the given URLs
listmodules Print a list of available extractor modules
listextractors Print a list of extractor classes with description, (sub)category and example URL
writelog FILE Write logging output to FILE
writeunsupported FILE Write URLs, which get emitted by other extractors but cannot be handled, to FILE
writepages Write downloaded intermediary pages to files in the current directory to debug problems

Downloader Options

r limitrate RATE Maximum download rate (e.g. 500k or 2.5M)
R retries N Maximum number of retries for failed HTTP requests or -1 for infinite retries (default: 4)
httptimeout SECONDS Timeout for HTTP connections (default: 30.0)
sleep SECONDS Number of seconds to wait before each download. This can be either a constant value or a range (e.g. 2.7 or 2.0-3.5)
sleeprequest SECONDS Number of seconds to wait between HTTP requests during data extraction
sleepextractor SECONDS Number of seconds to wait before starting data extraction for an input URL
filesizemin SIZE Do not download files smaller than SIZE (e.g. 500k or 2.5M)
filesizemax SIZE Do not download files larger than SIZE (e.g. 500k or 2.5M)
chunksize SIZE Size of in-memory data chunks (default: 32k)
nopart Do not use .part files
noskip Do not skip downloads; overwrite existing files
nomtime Do not set file modification times according to Last-Modified HTTP response headers
nodownload Do not download any files
nopostprocessors Do not run any post processors
nocheckcertificate Disable HTTPS certificate validation

Configuration Options

c config FILE Additional configuration files
o option OPT Additional <key>=<value> option values
ignoreconfig Do not read default configuration files

Authentication Options

u username USER Username to login with
p password PASS Password belonging to the given username
netrc Enable .netrc authentication data

Selection Options

downloadarchive FILE Record all downloaded or skipped files in FILE and skip downloading any file already in it
A abort N Stop current extractor run after N consecutive file downloads were skipped
T terminate N Stop current and parent extractor runs after N consecutive file downloads were skipped
range RANGE Index range(s) specifying which files to download. These can be either a constant value, range, or slice (e.g. 5, 8-20, or 1:24:3)
chapterrange RANGE Like --range, but applies to manga chapters and other delegated URLs
filter EXPR Python expression controlling which files to download. Files for which the expression evaluates to False are ignored. Available keys are the filename-specific ones listed by -K.
Example: --filter "image_width >= 1000 and rating in ('s', 'q')"
chapterfilter EXPR Like --filter, but applies to manga chapters and other delegated URLs

Post-processing Options

zip Store downloaded files in a ZIP archive
ugoiraconv Convert Pixiv Ugoira to WebM (requires FFmpeg)
ugoiraconvlossless Convert Pixiv Ugoira to WebM in VP9 lossless mode
ugoiraconvcopy Convert Pixiv Ugoira to MKV without re-encoding any frames
writemetadata Write metadata to separate JSON files
writeinfojson Write gallery metadata to a info.json file
writetags Write image tags to separate text files
mtimefromdate Set file modification times according to date metadata
exec CMD Execute CMD for each downloaded file.
Example: --exec "convert {} {}.png && rm {}"
execafter CMD Execute CMD after all files were downloaded successfully.
Example: --exec-after "cd {} && convert * ../doc.pdf"
P postprocessor NAME Activate the specified post processor