Name | gallery-dl-server JSON |
Version |
0.7.3
JSON |
| download |
home_page | None |
Summary | Web UI for downloading media with gallery-dl and yt-dlp. |
upload_time | 2025-02-22 16:37:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | The MIT License (MIT)
Copyright (c) 2015 Kevin Brey
Copyright (c) 2024-2025 qx6ghqkz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
image
gallery
video
media
downloader
server
web-ui
self-hosted
gallery-dl
youtube
yt-dlp
|
VCS |
 |
bugtrack_url |
|
requirements |
aiofiles
brotli
brotlicffi
gallery_dl
jinja2
mutagen
pycryptodomex
python-multipart
pyyaml
requests
starlette
toml
uvicorn
uvicorn
watchfiles
websockets
yt-dlp
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# gallery-dl-server
[](https://github.com/qx6ghqkz/gallery-dl-server/releases/latest "Latest Release")
[](https://pypi.org/project/gallery-dl-server "PyPI")
[](https://hub.docker.com/r/qx6ghqkz/gallery-dl-server "Docker")
[](https://hub.docker.com/r/qx6ghqkz/gallery-dl-server/tags "Docker Tags")
[](https://github.com/qx6ghqkz/gallery-dl-server/actions "GitHub Actions")
[](https://github.com/qx6ghqkz/gallery-dl-server/commits/main/ "Commit History")
[](https://raw.githubusercontent.com/qx6ghqkz/gallery-dl-server/master/LICENSE "License")
Web UI for [`gallery-dl`](https://github.com/mikf/gallery-dl) with support for downloading videos via [`yt-dlp`](https://github.com/yt-dlp/yt-dlp).

* [Running](#running)
* [Docker](#docker)
* [Docker Run](#docker-run)
* [Docker Compose](#docker-compose)
* [Port Mapping](#port-mapping)
* [Important Notes](#important-notes)
* [Python](#python)
* [Running from Source](#running-from-source)
* [Installation](#installation)
* [Standalone Executable](#standalone-executable)
* [Dependencies](#dependencies)
* [Optional](#optional)
* [Configuration](#configuration)
* [Docker Locations](#docker-locations)
* [Usage](#usage)
* [Web UI](#web-ui)
* [Curl](#curl)
* [Fetch](#fetch)
* [Bookmarklet](#bookmarklet)
* [Implementation](#implementation)
* [Useful Links](#useful-links)
* [gallery-dl](#gallery-dl)
* [yt-dlp](#yt-dlp)
## Running
### Docker
#### Docker Run
This example uses the `docker run` command to create the container to run the app.
```shell
docker run -d \
--name gallery-dl \
-p 9080:9080 \
-e UID=1000 \
-e GID=1000 \
-v "/path/to/config:/config" \
-v "/path/to/downloads:/gallery-dl" \
--restart on-failure \
qx6ghqkz/gallery-dl-server:latest
```
#### Docker Compose
This is an example of a `docker-compose.yaml` service definition which can be used to start a running container with the `docker compose up -d` command.
```yaml
services:
gallery-dl:
image: qx6ghqkz/gallery-dl-server:latest
container_name: gallery-dl
ports:
- 9080:9080
environment:
- UID=1000
- GID=1000
volumes:
- "/path/to/config:/config"
- "/path/to/downloads:/gallery-dl"
restart: on-failure
```
This is another example which uses a VPN client container for its networking.
```yaml
services:
gallery-dl:
image: qx6ghqkz/gallery-dl-server:latest
container_name: gallery-dl
network_mode: container:vpn
environment:
- UID=1000
- GID=1000
volumes:
- "/path/to/config:/config"
- "/path/to/downloads:/gallery-dl"
restart: on-failure
```
[Gluetun](https://github.com/qdm12/gluetun) is recommended for VPN usage. See [docs/docker-compose.yaml](https://github.com/qx6ghqkz/gallery-dl-server/blob/main/docs/docker-compose.yaml) for an example.
#### Port Mapping
By default, this service listens on port 9080. Any value can be used for the host port, but the `CONTAINER_PORT` environment variable needs to be set to change the internal container port. This can be done using the `-e` flag with `docker run` or in a Docker Compose file.
For example, to run multiple instances of gallery-dl-server using a single [Gluetun](https://github.com/qdm12/gluetun) instance for the networking (each instance must use a different internal port), a different container port can be set for one of the containers.
```yaml
services:
instance-1:
image: qx6ghqkz/gallery-dl-server:latest
container_name: day
depends_on:
- gluetun
network_mode: service:gluetun
[...]
instance-2:
image: qx6ghqkz/gallery-dl-server:latest
container_name: night
environment:
- CONTAINER_PORT=9090
depends_on:
- gluetun
network_mode: service:gluetun
[...]
gluetun:
image: qmcgaw/gluetun:latest
container_name: vpn
ports:
# instance-1
- 9080:9080
# instance-2
- 9090:9090
[...]
```
#### Important Notes
- Make sure to mount the directory containing the configuration file rather than the file itself. This ensures changes to the configuration file are propagated to the running Docker container and it will not need to be restarted for changes to take effect. More information on this issue [here](https://github.com/moby/moby/issues/15793#issuecomment-135411504).
- The output download directory depends on the `base-directory` in your gallery-dl configuration file. Make sure it is the absolute path `/gallery-dl/` instead of the relative path `./gallery-dl/` or else the download directory will need to be mounted to `/usr/src/app/gallery-dl` instead (not recommended).
- The environment variables `UID` and `GID` can be used to change the user ID and group ID of the user running the server process. This is important because downloaded files will be owned by that user. Make sure the IDs match those of the user on the host system. The default `UID:GID` is `1000:1000` when left unspecified.
### Python
If Python 3.10 or later (3.12 is recommended) is installed and on the PATH, the server can simply be run from the command line.
#### Running from Source
Clone this repository and install the dependencies located in `requirements.txt` in a virtual environment, then run the command below in the root folder while inside the virtual environment. On Windows, replace `python3` with `python`.
```shell
python3 -m gallery_dl_server --host "0.0.0.0" --port "9080"
```
The command-line arguments are optional. By default, the server will run on host `0.0.0.0` and an available port will be selected if one is not provided.
To view the full list of command-line arguments, perform `python3 -m gallery_dl_server -h` for help. These arguments can also be specified as environment variables.
#### Installation
The package and its dependencies can be installed with Python by performing `pip install gallery-dl-server`. To also install optional dependencies, perform `pip install gallery-dl-server[full]`. It is recommended to use a virtual environment to avoid dependency conflicts.
The package can be installed directly from the source code by performing `pip install .` in the root directory of the cloned repository. Perform `pip install .[full]` to install optional dependencies.
Installation allows running directly from the command line via the command `gallery-dl-server`. To view the list of command-line options, perform `gallery-dl-server -h` for help.
When installed, the log file will be created directly in the home directory of the user as long as the package is not found in the current working directory, in which case a `logs` folder will be created there to store the log file.
### Standalone Executable
On Windows, the program can be run using the prebuilt executable (`.exe`) file, which includes a Python interpreter and the required Python packages. Prebuilt executables for each release can be found in [Releases](https://github.com/qx6ghqkz/gallery-dl-server/releases).
By default, any available port will be selected. To select a specific port, run the executable from the command line and specify the port, and optionally host, as command-line arguments.
```cmd
gallery-dl-server.exe --host "0.0.0.0" --port "9080"
```
When run as an executable, the log file will be created in a `logs` folder in the same directory as the executable.
Configuration files can also be loaded from the same directory as the executable. The bundled releases contain a default configuration file in JSON, YAML and TOML formats, which are all supported.
## Dependencies
All required and optional Python and non-Python dependencies are included in the Docker image and will be available in the running container, however if you are running gallery-dl-server using any of the other methods, i.e. not with a Docker container, some dependencies may need to be installed separately.
In order to run with Python, the dependencies in `requirements.txt` need to be installed in the running Python environment. These Python dependencies are included in the standalone executable and do not need to be installed.
Installation with `pip` only installs the required dependencies by default. Install the `gallery-dl-server[full]` package to install the optional dependencies.
### Optional
- [brotli](https://github.com/google/brotli) or [brotlicffi](https://github.com/python-hyper/brotlicffi): Brotli content encoding support
- [mutagen](https://github.com/quodlibet/mutagen): embed metadata and thumbnails in certain formats
- [pycryptodomex](https://github.com/Legrandin/pycryptodome): decrypt AES-128 HLS streams and other forms of data
- [pyyaml](https://pyyaml.org): YAML configuration file support
- [toml](https://pypi.org/project/toml): TOML configuration file support (<= Python 3.10 only)
Non-Python dependencies are **not included**. [FFmpeg](https://ffmpeg.org) is strongly recommended for video and audio conversion and should be accessible from the command line, i.e. on the PATH.
There is also [MKVToolNix](https://mkvtoolnix.download/index.html), which includes [mkvmerge](https://www.matroska.org/downloads/mkvtoolnix.html) for accurate [Ugoira](https://www.pixiv.help/hc/en-us/articles/235584628-What-are-Ugoira) frame timecodes.
Dependencies for [gallery-dl](https://github.com/mikf/gallery-dl#dependencies) and [yt-dlp](https://github.com/yt-dlp/yt-dlp#dependencies) are documented in their respective repositories. The majority of these are optional Python dependencies and have been accounted for, however dependencies that are [strongly recommended](https://github.com/yt-dlp/yt-dlp#strongly-recommended) should be installed.
## Configuration
Configuration of gallery-dl is as documented in the [official documentation](https://github.com/mikf/gallery-dl#configuration). A configuration file is **required**.
If run outside of Docker, the [default locations](https://github.com/mikf/gallery-dl#locations) will be used to search for a configuration file. If run as an executable, the current directory will also be searched for a valid configuration file.
Additionally, YAML and TOML configuration files are supported at any of the pre-defined locations.
When run with Docker, the configuration file must be mounted inside the `/config` directory inside the container.
### Docker Locations
- `/config/gallery-dl.conf`
- `/config/gallery-dl.{yaml, yml}`
- `/config/gallery-dl.toml`
- `/config/config.json`
- `/config/config.{yaml, yml}`
- `/config/config.toml`
A [default configuration file](https://github.com/qx6ghqkz/gallery-dl-server/blob/main/docs/gallery-dl.conf) for use with gallery-dl-server has been provided and will automatically be placed in the directory mounted to `/config` if no valid configuration file exists in that location.
For more information on configuration file options, see [gallery-dl/docs/configuration.rst](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst).
Any additional locations specified in the configuration file must also exist inside the Docker container. For example, if a cookies file is required, ensure it is placed in a location accessible from within the Docker container.
It is recommended to place any additional files such as archive, cache and cookies files inside the same directory mounted to `/config` along with the configuration file.
## Usage
Downloads can be triggered by supplying the `{{url}}` of the requested video through the web UI or through the REST interface via curl, etc.
### Web UI
Just navigate to `http://{{host}}:9080/gallery-dl` and enter the requested `{{url}}`.
### Curl
```shell
curl -X POST --data-urlencode "url={{url}}" http://{{host}}:9080/gallery-dl/q
```
### Fetch
```javascript
fetch(`http://${host}:9080/gallery-dl/q`, {
method: "POST",
body: new URLSearchParams({
url: url
})
});
```
### Bookmarklet
The following bookmarklet can be used from the bookmarks bar to send the current page URL to the gallery-dl-server instance running on a particular host.
```javascript
javascript:(function(){var url="http://${host}:9080/gallery-dl/q",newTab=window.open(url,"_blank"),f=newTab.document.createElement("form");f.action=url;f.method="POST";var i=newTab.document.createElement("input");i.name="url";i.type="hidden";i.value=window.location.href;f.appendChild(i);newTab.document.body.appendChild(f);f.submit();})();
```
## Implementation
This service operates using the ASGI web server [`uvicorn`](https://github.com/encode/uvicorn) and is built on the [`starlette`](https://github.com/encode/starlette) ASGI framework.
Downloads are handled by [`gallery-dl`](https://github.com/mikf/gallery-dl) in conjunction with [`yt-dlp`](https://github.com/yt-dlp/yt-dlp). The integration with gallery-dl uses Python as discussed in [this issue](https://github.com/mikf/gallery-dl/issues/642). For video downloads, gallery-dl imports and uses yt-dlp.
The Docker image is based on [`python:3.12-alpine`](https://registry.hub.docker.com/_/python), which in turn is based on [`alpine`](https://hub.docker.com/_/alpine).
## Useful Links
### gallery-dl
- Documentation: [gallery-dl/README.rst](https://github.com/mikf/gallery-dl/blob/master/README.rst)
- Config file outline: [gallery-dl/wiki/config-file-outline](https://github.com/mikf/gallery-dl/wiki/config-file-outline)
- Configuration options: [gallery-dl/docs/configuration.rst](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst)
- List of supported sites: [gallery-dl/docs/supportedsites.md](https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.md)
### yt-dlp
- Documentation: [yt-dlp/README.md](https://github.com/yt-dlp/yt-dlp/blob/master/README.md)
- List of supported sites: [yt-dlp/supportedsites.md](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)
- List of extractors: [yt-dlp/yt_dlp/extractor/_extractors.py](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/_extractors.py)
Raw data
{
"_id": null,
"home_page": null,
"name": "gallery-dl-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "qx6ghqkz <qx6ghqkz@proton.me>",
"keywords": "image, gallery, video, media, downloader, server, web-ui, self-hosted, gallery-dl, youtube, yt-dlp",
"author": null,
"author_email": "qx6ghqkz <qx6ghqkz@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/1f/08/b5ed47eb73f6500d2c5144eb5af96c2040ab8aa8007e1bee03fb5390da75/gallery_dl_server-0.7.3.tar.gz",
"platform": null,
"description": "# gallery-dl-server\r\n\r\n[](https://github.com/qx6ghqkz/gallery-dl-server/releases/latest \"Latest Release\")\r\n[](https://pypi.org/project/gallery-dl-server \"PyPI\")\r\n[](https://hub.docker.com/r/qx6ghqkz/gallery-dl-server \"Docker\")\r\n[](https://hub.docker.com/r/qx6ghqkz/gallery-dl-server/tags \"Docker Tags\")\r\n[](https://github.com/qx6ghqkz/gallery-dl-server/actions \"GitHub Actions\")\r\n[](https://github.com/qx6ghqkz/gallery-dl-server/commits/main/ \"Commit History\")\r\n[](https://raw.githubusercontent.com/qx6ghqkz/gallery-dl-server/master/LICENSE \"License\")\r\n\r\nWeb UI for [`gallery-dl`](https://github.com/mikf/gallery-dl) with support for downloading videos via [`yt-dlp`](https://github.com/yt-dlp/yt-dlp).\r\n\r\n\r\n\r\n* [Running](#running)\r\n * [Docker](#docker)\r\n * [Docker Run](#docker-run)\r\n * [Docker Compose](#docker-compose)\r\n * [Port Mapping](#port-mapping)\r\n * [Important Notes](#important-notes)\r\n * [Python](#python)\r\n * [Running from Source](#running-from-source)\r\n * [Installation](#installation)\r\n * [Standalone Executable](#standalone-executable)\r\n* [Dependencies](#dependencies)\r\n * [Optional](#optional)\r\n* [Configuration](#configuration)\r\n * [Docker Locations](#docker-locations)\r\n* [Usage](#usage)\r\n * [Web UI](#web-ui)\r\n * [Curl](#curl)\r\n * [Fetch](#fetch)\r\n * [Bookmarklet](#bookmarklet)\r\n* [Implementation](#implementation)\r\n* [Useful Links](#useful-links)\r\n * [gallery-dl](#gallery-dl)\r\n * [yt-dlp](#yt-dlp)\r\n\r\n## Running\r\n\r\n### Docker\r\n\r\n#### Docker Run\r\n\r\nThis example uses the `docker run` command to create the container to run the app.\r\n\r\n```shell\r\ndocker run -d \\\r\n --name gallery-dl \\\r\n -p 9080:9080 \\\r\n -e UID=1000 \\\r\n -e GID=1000 \\\r\n -v \"/path/to/config:/config\" \\\r\n -v \"/path/to/downloads:/gallery-dl\" \\\r\n --restart on-failure \\\r\n qx6ghqkz/gallery-dl-server:latest\r\n```\r\n\r\n#### Docker Compose\r\n\r\nThis is an example of a `docker-compose.yaml` service definition which can be used to start a running container with the `docker compose up -d` command.\r\n\r\n```yaml\r\nservices:\r\n gallery-dl:\r\n image: qx6ghqkz/gallery-dl-server:latest\r\n container_name: gallery-dl\r\n ports:\r\n - 9080:9080\r\n environment:\r\n - UID=1000\r\n - GID=1000\r\n volumes:\r\n - \"/path/to/config:/config\"\r\n - \"/path/to/downloads:/gallery-dl\"\r\n restart: on-failure\r\n```\r\n\r\nThis is another example which uses a VPN client container for its networking.\r\n\r\n```yaml\r\nservices:\r\n gallery-dl:\r\n image: qx6ghqkz/gallery-dl-server:latest\r\n container_name: gallery-dl\r\n network_mode: container:vpn\r\n environment:\r\n - UID=1000\r\n - GID=1000\r\n volumes:\r\n - \"/path/to/config:/config\"\r\n - \"/path/to/downloads:/gallery-dl\"\r\n restart: on-failure\r\n```\r\n\r\n[Gluetun](https://github.com/qdm12/gluetun) is recommended for VPN usage. See [docs/docker-compose.yaml](https://github.com/qx6ghqkz/gallery-dl-server/blob/main/docs/docker-compose.yaml) for an example.\r\n\r\n#### Port Mapping\r\n\r\nBy default, this service listens on port 9080. Any value can be used for the host port, but the `CONTAINER_PORT` environment variable needs to be set to change the internal container port. This can be done using the `-e` flag with `docker run` or in a Docker Compose file.\r\n\r\nFor example, to run multiple instances of gallery-dl-server using a single [Gluetun](https://github.com/qdm12/gluetun) instance for the networking (each instance must use a different internal port), a different container port can be set for one of the containers.\r\n\r\n```yaml\r\nservices:\r\n instance-1:\r\n image: qx6ghqkz/gallery-dl-server:latest\r\n container_name: day\r\n depends_on:\r\n - gluetun\r\n network_mode: service:gluetun\r\n [...]\r\n\r\n instance-2:\r\n image: qx6ghqkz/gallery-dl-server:latest\r\n container_name: night\r\n environment:\r\n - CONTAINER_PORT=9090\r\n depends_on:\r\n - gluetun\r\n network_mode: service:gluetun\r\n [...]\r\n\r\n gluetun:\r\n image: qmcgaw/gluetun:latest\r\n container_name: vpn\r\n ports:\r\n # instance-1\r\n - 9080:9080\r\n # instance-2\r\n - 9090:9090\r\n [...]\r\n```\r\n\r\n#### Important Notes\r\n\r\n- Make sure to mount the directory containing the configuration file rather than the file itself. This ensures changes to the configuration file are propagated to the running Docker container and it will not need to be restarted for changes to take effect. More information on this issue [here](https://github.com/moby/moby/issues/15793#issuecomment-135411504).\r\n\r\n- The output download directory depends on the `base-directory` in your gallery-dl configuration file. Make sure it is the absolute path `/gallery-dl/` instead of the relative path `./gallery-dl/` or else the download directory will need to be mounted to `/usr/src/app/gallery-dl` instead (not recommended).\r\n\r\n- The environment variables `UID` and `GID` can be used to change the user ID and group ID of the user running the server process. This is important because downloaded files will be owned by that user. Make sure the IDs match those of the user on the host system. The default `UID:GID` is `1000:1000` when left unspecified.\r\n\r\n### Python\r\n\r\nIf Python 3.10 or later (3.12 is recommended) is installed and on the PATH, the server can simply be run from the command line.\r\n\r\n#### Running from Source\r\n\r\nClone this repository and install the dependencies located in `requirements.txt` in a virtual environment, then run the command below in the root folder while inside the virtual environment. On Windows, replace `python3` with `python`.\r\n\r\n```shell\r\npython3 -m gallery_dl_server --host \"0.0.0.0\" --port \"9080\"\r\n```\r\n\r\nThe command-line arguments are optional. By default, the server will run on host `0.0.0.0` and an available port will be selected if one is not provided.\r\n\r\nTo view the full list of command-line arguments, perform `python3 -m gallery_dl_server -h` for help. These arguments can also be specified as environment variables.\r\n\r\n#### Installation\r\n\r\nThe package and its dependencies can be installed with Python by performing `pip install gallery-dl-server`. To also install optional dependencies, perform `pip install gallery-dl-server[full]`. It is recommended to use a virtual environment to avoid dependency conflicts.\r\n\r\nThe package can be installed directly from the source code by performing `pip install .` in the root directory of the cloned repository. Perform `pip install .[full]` to install optional dependencies.\r\n\r\nInstallation allows running directly from the command line via the command `gallery-dl-server`. To view the list of command-line options, perform `gallery-dl-server -h` for help.\r\n\r\nWhen installed, the log file will be created directly in the home directory of the user as long as the package is not found in the current working directory, in which case a `logs` folder will be created there to store the log file.\r\n\r\n### Standalone Executable\r\n\r\nOn Windows, the program can be run using the prebuilt executable (`.exe`) file, which includes a Python interpreter and the required Python packages. Prebuilt executables for each release can be found in [Releases](https://github.com/qx6ghqkz/gallery-dl-server/releases).\r\n\r\nBy default, any available port will be selected. To select a specific port, run the executable from the command line and specify the port, and optionally host, as command-line arguments.\r\n\r\n```cmd\r\ngallery-dl-server.exe --host \"0.0.0.0\" --port \"9080\"\r\n```\r\n\r\nWhen run as an executable, the log file will be created in a `logs` folder in the same directory as the executable.\r\n\r\nConfiguration files can also be loaded from the same directory as the executable. The bundled releases contain a default configuration file in JSON, YAML and TOML formats, which are all supported.\r\n\r\n## Dependencies\r\n\r\nAll required and optional Python and non-Python dependencies are included in the Docker image and will be available in the running container, however if you are running gallery-dl-server using any of the other methods, i.e. not with a Docker container, some dependencies may need to be installed separately.\r\n\r\nIn order to run with Python, the dependencies in `requirements.txt` need to be installed in the running Python environment. These Python dependencies are included in the standalone executable and do not need to be installed.\r\n\r\nInstallation with `pip` only installs the required dependencies by default. Install the `gallery-dl-server[full]` package to install the optional dependencies.\r\n\r\n### Optional\r\n\r\n- [brotli](https://github.com/google/brotli) or [brotlicffi](https://github.com/python-hyper/brotlicffi): Brotli content encoding support\r\n- [mutagen](https://github.com/quodlibet/mutagen): embed metadata and thumbnails in certain formats\r\n- [pycryptodomex](https://github.com/Legrandin/pycryptodome): decrypt AES-128 HLS streams and other forms of data\r\n- [pyyaml](https://pyyaml.org): YAML configuration file support\r\n- [toml](https://pypi.org/project/toml): TOML configuration file support (<= Python 3.10 only)\r\n\r\nNon-Python dependencies are **not included**. [FFmpeg](https://ffmpeg.org) is strongly recommended for video and audio conversion and should be accessible from the command line, i.e. on the PATH.\r\n\r\nThere is also [MKVToolNix](https://mkvtoolnix.download/index.html), which includes [mkvmerge](https://www.matroska.org/downloads/mkvtoolnix.html) for accurate [Ugoira](https://www.pixiv.help/hc/en-us/articles/235584628-What-are-Ugoira) frame timecodes.\r\n\r\nDependencies for [gallery-dl](https://github.com/mikf/gallery-dl#dependencies) and [yt-dlp](https://github.com/yt-dlp/yt-dlp#dependencies) are documented in their respective repositories. The majority of these are optional Python dependencies and have been accounted for, however dependencies that are [strongly recommended](https://github.com/yt-dlp/yt-dlp#strongly-recommended) should be installed.\r\n\r\n## Configuration\r\n\r\nConfiguration of gallery-dl is as documented in the [official documentation](https://github.com/mikf/gallery-dl#configuration). A configuration file is **required**.\r\n\r\nIf run outside of Docker, the [default locations](https://github.com/mikf/gallery-dl#locations) will be used to search for a configuration file. If run as an executable, the current directory will also be searched for a valid configuration file.\r\n\r\nAdditionally, YAML and TOML configuration files are supported at any of the pre-defined locations.\r\n\r\nWhen run with Docker, the configuration file must be mounted inside the `/config` directory inside the container.\r\n\r\n### Docker Locations\r\n\r\n- `/config/gallery-dl.conf`\r\n- `/config/gallery-dl.{yaml, yml}`\r\n- `/config/gallery-dl.toml`\r\n- `/config/config.json`\r\n- `/config/config.{yaml, yml}`\r\n- `/config/config.toml`\r\n\r\nA [default configuration file](https://github.com/qx6ghqkz/gallery-dl-server/blob/main/docs/gallery-dl.conf) for use with gallery-dl-server has been provided and will automatically be placed in the directory mounted to `/config` if no valid configuration file exists in that location.\r\n\r\nFor more information on configuration file options, see [gallery-dl/docs/configuration.rst](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst).\r\n\r\nAny additional locations specified in the configuration file must also exist inside the Docker container. For example, if a cookies file is required, ensure it is placed in a location accessible from within the Docker container.\r\n\r\nIt is recommended to place any additional files such as archive, cache and cookies files inside the same directory mounted to `/config` along with the configuration file.\r\n\r\n## Usage\r\n\r\nDownloads can be triggered by supplying the `{{url}}` of the requested video through the web UI or through the REST interface via curl, etc.\r\n\r\n### Web UI\r\n\r\nJust navigate to `http://{{host}}:9080/gallery-dl` and enter the requested `{{url}}`.\r\n\r\n### Curl\r\n\r\n```shell\r\ncurl -X POST --data-urlencode \"url={{url}}\" http://{{host}}:9080/gallery-dl/q\r\n```\r\n\r\n### Fetch\r\n\r\n```javascript\r\nfetch(`http://${host}:9080/gallery-dl/q`, {\r\n method: \"POST\",\r\n body: new URLSearchParams({\r\n url: url\r\n })\r\n});\r\n```\r\n\r\n### Bookmarklet\r\n\r\nThe following bookmarklet can be used from the bookmarks bar to send the current page URL to the gallery-dl-server instance running on a particular host.\r\n\r\n```javascript\r\njavascript:(function(){var url=\"http://${host}:9080/gallery-dl/q\",newTab=window.open(url,\"_blank\"),f=newTab.document.createElement(\"form\");f.action=url;f.method=\"POST\";var i=newTab.document.createElement(\"input\");i.name=\"url\";i.type=\"hidden\";i.value=window.location.href;f.appendChild(i);newTab.document.body.appendChild(f);f.submit();})();\r\n```\r\n\r\n## Implementation\r\n\r\nThis service operates using the ASGI web server [`uvicorn`](https://github.com/encode/uvicorn) and is built on the [`starlette`](https://github.com/encode/starlette) ASGI framework.\r\n\r\nDownloads are handled by [`gallery-dl`](https://github.com/mikf/gallery-dl) in conjunction with [`yt-dlp`](https://github.com/yt-dlp/yt-dlp). The integration with gallery-dl uses Python as discussed in [this issue](https://github.com/mikf/gallery-dl/issues/642). For video downloads, gallery-dl imports and uses yt-dlp.\r\n\r\nThe Docker image is based on [`python:3.12-alpine`](https://registry.hub.docker.com/_/python), which in turn is based on [`alpine`](https://hub.docker.com/_/alpine).\r\n\r\n## Useful Links\r\n\r\n### gallery-dl\r\n\r\n- Documentation: [gallery-dl/README.rst](https://github.com/mikf/gallery-dl/blob/master/README.rst)\r\n- Config file outline: [gallery-dl/wiki/config-file-outline](https://github.com/mikf/gallery-dl/wiki/config-file-outline)\r\n- Configuration options: [gallery-dl/docs/configuration.rst](https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst)\r\n- List of supported sites: [gallery-dl/docs/supportedsites.md](https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.md)\r\n\r\n### yt-dlp\r\n\r\n- Documentation: [yt-dlp/README.md](https://github.com/yt-dlp/yt-dlp/blob/master/README.md)\r\n- List of supported sites: [yt-dlp/supportedsites.md](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)\r\n- List of extractors: [yt-dlp/yt_dlp/extractor/_extractors.py](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/_extractors.py)\r\n",
"bugtrack_url": null,
"license": "The MIT License (MIT)\r\n \r\n Copyright (c) 2015 Kevin Brey\r\n Copyright (c) 2024-2025 qx6ghqkz\r\n \r\n Permission is hereby granted, free of charge, to any person obtaining a copy\r\n of this software and associated documentation files (the \"Software\"), to deal\r\n in the Software without restriction, including without limitation the rights\r\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n copies of the Software, and to permit persons to whom the Software is\r\n furnished to do so, subject to the following conditions:\r\n \r\n The above copyright notice and this permission notice shall be included in all\r\n copies or substantial portions of the Software.\r\n \r\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n SOFTWARE.\r\n ",
"summary": "Web UI for downloading media with gallery-dl and yt-dlp.",
"version": "0.7.3",
"project_urls": {
"Docker": "https://hub.docker.com/r/qx6ghqkz/gallery-dl-server",
"Documentation": "https://github.com/qx6ghqkz/gallery-dl-server#readme",
"Issues": "https://github.com/qx6ghqkz/gallery-dl-server/issues",
"Releases": "https://github.com/qx6ghqkz/gallery-dl-server/releases",
"Repository": "https://github.com/qx6ghqkz/gallery-dl-server"
},
"split_keywords": [
"image",
" gallery",
" video",
" media",
" downloader",
" server",
" web-ui",
" self-hosted",
" gallery-dl",
" youtube",
" yt-dlp"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "da565f0cca81f47879edcb5f1d620957f9e107d7d8b48c65b2c4575f8f84925d",
"md5": "8bbeb07ea79d91a286bcac5ddc229bfd",
"sha256": "b742edf69e2fd4680d212501f6895662ea94ef3f2123ae15a1ca69e8b435f3cf"
},
"downloads": -1,
"filename": "gallery_dl_server-0.7.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8bbeb07ea79d91a286bcac5ddc229bfd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 147530,
"upload_time": "2025-02-22T16:37:00",
"upload_time_iso_8601": "2025-02-22T16:37:00.625002Z",
"url": "https://files.pythonhosted.org/packages/da/56/5f0cca81f47879edcb5f1d620957f9e107d7d8b48c65b2c4575f8f84925d/gallery_dl_server-0.7.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1f08b5ed47eb73f6500d2c5144eb5af96c2040ab8aa8007e1bee03fb5390da75",
"md5": "985adcfc24a6556637fbcf242bc0ffc8",
"sha256": "b7d6c6f23b39eba0bbe591c148dece759f214c5b102f3cc4bc7cb60282c78e0a"
},
"downloads": -1,
"filename": "gallery_dl_server-0.7.3.tar.gz",
"has_sig": false,
"md5_digest": "985adcfc24a6556637fbcf242bc0ffc8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 161543,
"upload_time": "2025-02-22T16:37:02",
"upload_time_iso_8601": "2025-02-22T16:37:02.820778Z",
"url": "https://files.pythonhosted.org/packages/1f/08/b5ed47eb73f6500d2c5144eb5af96c2040ab8aa8007e1bee03fb5390da75/gallery_dl_server-0.7.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-22 16:37:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qx6ghqkz",
"github_project": "gallery-dl-server#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiofiles",
"specs": [
[
"==",
"24.1.0"
]
]
},
{
"name": "brotli",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "brotlicffi",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "gallery_dl",
"specs": [
[
"==",
"1.28.5"
]
]
},
{
"name": "jinja2",
"specs": [
[
"==",
"3.1.5"
]
]
},
{
"name": "mutagen",
"specs": [
[
"==",
"1.47.0"
]
]
},
{
"name": "pycryptodomex",
"specs": [
[
"==",
"3.21.0"
]
]
},
{
"name": "python-multipart",
"specs": [
[
"==",
"0.0.20"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "starlette",
"specs": [
[
"==",
"0.45.3"
]
]
},
{
"name": "toml",
"specs": [
[
"==",
"0.10.2"
]
]
},
{
"name": "uvicorn",
"specs": [
[
"==",
"0.34.0"
]
]
},
{
"name": "uvicorn",
"specs": [
[
"==",
"0.34.0"
]
]
},
{
"name": "watchfiles",
"specs": [
[
"==",
"1.0.4"
]
]
},
{
"name": "websockets",
"specs": [
[
"==",
"15.0"
]
]
},
{
"name": "yt-dlp",
"specs": [
[
"==",
"2025.2.19"
]
]
}
],
"lcname": "gallery-dl-server"
}