back to home

mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites

17,222 stars
1,353 forks
1,133 issues
PythonShellMakefile

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing mikf/gallery-dl in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/mikf/gallery-dl)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

========== gallery-dl ========== *gallery-dl* is a command-line program to download image galleries and collections from several image hosting sites (see __). It is a cross-platform tool with many __ and __ options, as well as powerful __. |pypi| |discord| |build| .. contents:: Dependencies ============ • Python_ 3.8+ • Requests_ Optional -------- • yt-dlp_ or youtube-dl_: HLS/DASH video downloads, ytdl integration • FFmpeg_: Pixiv Ugoira conversion • mkvmerge_: Accurate Ugoira frame timecodes • PySocks_: SOCKS proxy support • brotli_ or brotlicffi_: Brotli compression support • zstandard_: Zstandard compression support • PyYAML_: YAML configuration file support • toml_: TOML configuration file support for Python " For Home Manager users, you can manage *gallery-dl* declaratively: .. code:: nix programs.gallery-dl = { enable = true; settings = { extractor.base-directory = "~/Downloads"; }; }; Alternatively, you can just add it to :code: if you don't want to manage it declaratively: .. code:: nix home.packages = with pkgs; [ gallery-dl ]; After making these changes, simply rebuild your configuration and open a new shell to have *gallery-dl* available. Usage ===== To use *gallery-dl* simply call it with the URLs you wish to download images from: .. code:: bash gallery-dl [OPTIONS]... URLS... Use :code: or see __ for a full list of all command-line options. Examples -------- Download images; in this case from danbooru via tag search for 'bonocho': .. code:: bash gallery-dl "https://danbooru.donmai.us/posts?tags=bonocho" Get the direct URL of an image from a site supporting authentication with username & password: .. code:: bash gallery-dl -g -u " " -p " " "https://twitter.com/i/web/status/604341487988576256" Filter manga chapters by chapter number and language: .. code:: bash gallery-dl --chapter-filter "10 \ ) Linux, macOS, etc.: • /etc/gallery-dl.conf • ${XDG_CONFIG_HOME}/gallery-dl/config.json • ${HOME}/.config/gallery-dl/config.json • ${HOME}/.gallery-dl.conf When run as __, *gallery-dl* will also look for a gallery-dl.conf file in the same directory as said executable. It is possible to use more than one configuration file at a time. In this case, any values from files after the first will get merged into the already loaded settings and potentially override previous ones. Authentication ============== Username & Password ------------------- Some extractors require you to provide valid login credentials in the form of a username & password pair. This is necessary for nijie and optional for aryion , danbooru , e621 , exhentai , idolcomplex , imgbb , inkbunny , mangadex , mangoxo , pillowfort , sankaku , subscribestar , tapas , tsumino , twitter , and zerochan . You can set the necessary information in your __ .. code:: json { "extractor": { "twitter": { "username": " ", "password": " " } } } or you can provide them directly via the :code: and :code: or via the :code: command-line options .. code:: bash gallery-dl -u " " -p " " "URL" gallery-dl -o "username= " -o "password= " "URL" Cookies ------- For sites where login with username & password is not possible due to CAPTCHA or similar, or has not been implemented yet, you can use the cookies from a browser login session and input them into *gallery-dl*. This can be done via the __ option in your configuration file by specifying • | the path to a Mozilla/Netscape format cookies.txt file exported by a browser addon | (e.g. __ for Chrome, __ for Firefox) • | a list of name-value pairs gathered from your browser's web developer tools | (in __, in __) • | the name of a browser to extract cookies from | (supported browsers are Chromium-based ones, Firefox, and Safari) For example: .. code:: json { "extractor": { "instagram": { "cookies": "$HOME/path/to/cookies.txt" }, "patreon": { "cookies": { "session_id": "K1T57EKu19TR49C51CDjOJoXNQLF7VbdVOiBrC9ye0a" } }, "twitter": { "cookies": ["firefox"] } } } | You can also specify a cookies.txt file with the :code: command-line option | or a browser to extract cookies from with :code: : .. code:: bash gallery-dl --cookies "$HOME/path/to/cookies.txt" "URL" gallery-dl --cookies-from-browser firefox "URL" OAuth ----- *gallery-dl* supports user authentication via OAuth_ for some extractors. This is necessary for pixiv and optional for deviantart , flickr , reddit , smugmug , tumblr , and mastodon instances. Linking your account to *gallery-dl* grants it the ability to issue requests on your account's behalf and enables it to access resources which would otherwise be unavailable to a public user. To do so, start by invoking it with oauth: as an argument. For example: .. code:: bash gallery-dl oauth:flickr You will be sent to the site's authorization page and asked to grant read access to *gallery-dl*. Authorize it and you will be shown one or more "tokens", which should be added to your configuration file. To authenticate with a mastodon instance, run *gallery-dl* with oauth:mastodon: as argument. For example: .. code:: bash gallery-dl oauth:mastodon:pawoo.net gallery-dl oauth:mastodon:https://mastodon.social/ .. _Python: https://www.python.org/downloads/ .. _PyPI: https://pypi.org/ .. _pip: https://pip.pypa.io/en/stable/ .. _Requests: https://requests.readthedocs.io/en/latest/ .. _FFmpeg: https://www.ffmpeg.org/ .. _mkvmerge: https://www.matroska.org/downloads/mkvtoolnix.html .. _yt-dlp: https://github.com/yt-dlp/yt-dlp .. _youtube-dl: https://ytdl-org.github.io/youtube-dl/ .. _PySocks: https://pypi.org/project/PySocks/ .. _brotli: https://github.com/google/brotli .. _brotlicffi: https://github.com/python-hyper/brotlicffi .. _zstandard: https://github.com/indygreg/python-zstandard .. _PyYAML: https://pyyaml.org/ .. _toml: https://pypi.org/project/toml/ .. _SecretStorage: https://pypi.org/project/SecretStorage/ .. _Psycopg: https://www.psycopg.org/ .. _truststore: https://tru…