logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gallery-dl - download image-galleries and -collections

Authors

       Mike Fährmann <mike_faehrmann@web.de>
       and https://github.com/mikf/gallery-dl/graphs/contributors

Bugs

       https://github.com/mikf/gallery-dl/issues

Description

gallery-dl  is  a  command-line  program  to download image-galleries and -collections from several image
       hosting sites. It is a cross-platform tool  with  many  configuration  options  and  powerful  filenaming
       capabilities.

Examples

       gallery-dl URL
              Download images from URL.

       gallery-dl -g -u <username> -p <password> URL
              Print direct URLs from a site that requires authentication.

       gallery-dl --filter 'type == "ugoira"' --range '2-4' URL
              Apply  filter  and  range  expressions. This will only download the second, third, and fourth file
              where its type value is equal to "ugoira".

       gallery-dl r:URL
              Scan URL for other URLs and invoke gallery-dl on them.

       gallery-dl oauth:SITE-NAME
              Gain OAuth authentication tokens for deviantart, flickr, reddit, smugmug, and tumblr.

Files

/etc/gallery-dl.conf
              The system wide configuration file.

       ~/.config/gallery-dl/config.json
              Per user configuration file.

       ~/.gallery-dl.conf
              Alternate per user configuration file.

Name

       gallery-dl - download image-galleries and -collections

Options

-h,--help
              Print this help message and exit

       --version
              Print program version and exit

       -f,--filenameFORMAT
              Filename format string for downloaded files ('/O' for "original" filenames)

       -d,--destinationPATH
              Target location for file downloads

       -D,--directoryPATH
              Exact location for file downloads

       -X,--extractorsPATH
              Load external extractors from PATH

       --user-agentUA
              User-Agent request header

       --clear-cacheMODULE
              Delete cached login sessions, cookies, etc. for MODULE (ALL to delete everything)

       -U,--update-check
              Check if a newer version is available

       -i,--input-fileFILE
              Download URLs found in FILE ('-' for stdin). More than one --input-file can be specified

       -I,--input-file-commentFILE
              Download URLs found in FILE. Comment them out after they were downloaded successfully.

       -x,--input-file-deleteFILE
              Download URLs found in FILE. Delete them after they were downloaded successfully.

       --no-input
              Do not prompt for passwords/tokens

       -q,--quiet
              Activate quiet mode

       -w,--warning
              Print only warnings and errors

       -v,--verbose
              Print various debugging information

       -g,--get-urls
              Print URLs instead of downloading

       -G,--resolve-urls
              Print URLs instead of downloading; resolve intermediary URLs

       -j,--dump-json
              Print JSON information

       -J,--resolve-json
              Print JSON information; resolve intermediary URLs

       -s,--simulate
              Simulate data extraction; do not download anything

       -E,--extractor-info
              Print extractor defaults and settings

       -K,--list-keywords
              Print a list of available keywords and example values for the given URLs

       -e,--error-fileFILE
              Add input URLs which returned an error to FILE

       -N,--print[EVENT:]FORMAT
              Write   FORMAT   during   EVENT   (default  'prepare')  to  standard  output.  Examples:  'id'  or
              'post:{md5[:8]}'

       --print-to-file[EVENT:]FORMATFILE
              Append FORMAT during EVENT to FILE

       --list-modules
              Print a list of available extractor modules

       --list-extractors[CATEGORIES]
              Print a list of extractor classes with description, (sub)category and example URL

       --write-logFILE
              Write logging output to FILE

       --write-unsupportedFILE
              Write URLs, which get emitted by other extractors but cannot be handled, to FILE

       --write-pages
              Write downloaded intermediary pages to files in the current directory to debug problems

       --print-traffic
              Display sent and read HTTP traffic

       --no-colors
              Do not emit ANSI color codes in output

       -R,--retriesN
              Maximum number of retries for failed HTTP requests or -1 for infinite retries (default: 4)

       --http-timeoutSECONDS
              Timeout for HTTP connections (default: 30.0)

       --proxyURL
              Use the specified proxy

       --source-addressIP
              Client-side IP address to bind to

       -4,--force-ipv4
              Make all connections via IPv4

       -6,--force-ipv6
              Make all connections via IPv6

       --no-check-certificate
              Disable HTTPS certificate validation

       -r,--limit-rateRATE
              Maximum download rate (e.g. 500k or 2.5M)

       --chunk-sizeSIZE
              Size of in-memory data chunks (default: 32k)

       --sleepSECONDS
              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)

       --sleep-requestSECONDS
              Number of seconds to wait between HTTP requests during data extraction

       --sleep-extractorSECONDS
              Number of seconds to wait before starting data extraction for an input URL

       --no-part
              Do not use .part files

       --no-skip
              Do not skip downloads; overwrite existing files

       --no-mtime
              Do not set file modification times according to Last-Modified HTTP response headers

       --no-download
              Do not download any files

       -o,--optionKEY=VALUE
              Additional options. Example: -o browser=firefox

       -c,--configFILE
              Additional configuration files

       --config-yamlFILE
              Additional configuration files in YAML format

       --config-tomlFILE
              Additional configuration files in TOML format

       --config-create
              Create a basic configuration file

       --config-status
              Show configuration file status

       --config-open
              Open configuration file in external application

       --config-ignore
              Do not read default configuration files

       -u,--usernameUSER
              Username to login with

       -p,--passwordPASS
              Password belonging to the given username

       --netrc
              Enable .netrc authentication data

       -C,--cookiesFILE
              File to load additional cookies from

       --cookies-exportFILE
              Export session cookies to FILE

       --cookies-from-browserBROWSER[/DOMAIN][+KEYRING][:PROFILE][::CONTAINER]
              Name  of  the  browser  to load cookies from, with optional domain prefixed with '/', keyring name
              prefixed with '+', profile prefixed with ':', and container prefixed  with  '::'  ('none'  for  no
              container (default), 'all' for all containers)

       -A,--abortN
              Stop current extractor run after N consecutive file downloads were skipped

       -T,--terminateN
              Stop current and parent extractor runs after N consecutive file downloads were skipped

       --filesize-minSIZE
              Do not download files smaller than SIZE (e.g. 500k or 2.5M)

       --filesize-maxSIZE
              Do not download files larger than SIZE (e.g. 500k or 2.5M)

       --download-archiveFILE
              Record all downloaded or skipped files in FILE and skip downloading any file already in it

       --rangeRANGE
              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')

       --chapter-rangeRANGE
              Like '--range', but applies to manga chapters and other delegated URLs

       --filterEXPR
              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')"

       --chapter-filterEXPR
              Like '--filter', but applies to manga chapters and other delegated URLs

       -P,--postprocessorNAME
              Activate the specified post processor

       --no-postprocessors
              Do not run any post processors

       -O,--postprocessor-optionKEY=VALUE
              Additional post processor options

       --write-metadata
              Write metadata to separate JSON files

       --write-info-json
              Write gallery metadata to a info.json file

       --write-tags
              Write image tags to separate text files

       --zip  Store downloaded files in a ZIP archive

       --cbz  Store downloaded files in a CBZ archive

       --mtimeNAME
              Set  file  modification  times  according  to  metadata  selected  by  NAME.  Examples:  'date' or
              'status[date]'

       --renameFORMAT
              Rename previously downloaded files from FORMAT to the current filename format

       --rename-toFORMAT
              Rename previously downloaded files from the current filename format to FORMAT

       --ugoiraFMT
              Convert Pixiv Ugoira to FMT using FFmpeg. Supported  formats  are  'webm',  'mp4',  'gif',  'vp8',
              'vp9', 'vp9-lossless', 'copy', 'zip'.

       --execCMD
              Execute   CMD  for  each  downloaded  file.  Supported  replacement  fields  are  {}  or  {_path},
              {_directory}, {_filename}. Example: --exec "convert {} {}.png && rm {}"

       --exec-afterCMD
              Execute CMD after all files were downloaded. Example: --exec-after "cd {_directory} &&  convert  *
              ../doc.pdf"

See Also

gallery-dl.conf(5)

1.29.3                                             2025-03-29                                      GALLERY-DL(1)

Synopsis

gallery-dl [OPTION]... URL...

See Also