The first step is to create a configuration file,
The exact location depends on the host system, but for Windows the default is %APPDATA%\gallery-dl\config.json
,
See here for other locations.
For a new user I recommend starting with a minimal config and expanding as necessary, refer to the following template:
{
"extractor": {
"twitter": {
"username": "YOUR_TWITTER_NAME",
"password": "YOUR_TWITTER_PASSWORD",
"cookies": {
}
},
"pixiv": {
"refresh-token": "TODO",
"cookies": {
"PHPSESSID": "TODO"
}
}
}
}
Fill in the twitter username and password fields with your account. Note that it is recommended to use a separate account specifically for gallery-dl, in case it gets banned.
Sometimes username/password authentication for Twitter doesn't work, in which case you must fill out the "cookies"
section instead — see here for an explanation of how to use cookies.
For Pixiv, you must follow the OAuth process described here to obtain a value for "refresh-token"
.
The Pixiv extractor has a quirk which according to the author may lead to some art being missed unless the "PHPSESSID"
cookie value is also provided. See above for instructions regarding cookies.
This page describes the config options available for each extractor: https://gdl-org.github.io/docs/configuration.html
Once your config file has been created, you need to launch Gallery-DL. The way to do this depends on how you have installed it.
It is a command-line application so you must start by opening Command Prompt if you're using Windows. If you're using another OS I probably don't have to explain how to open a terminal.
If you have gallery-dl installed into your %PATH%
(or $PATH
), you should be able to run it with the following command:
gallery-dl URL
Where URL
is an address to extract from such as "https://twitter.com/bipface"
.
If you have installed gallery-dl via a python package manager (such as pip), try this command:
python -m gallery_dl URL
If you have simply placed a gallery-dl executable into a directory without updating %PATH%
(or $PATH
), you'll need to specify the full path to it, such as:
"c:\program files\gallery-dl\gallery-dl.exe" URL
Once extraction has begun, it should start to download files into a subfolder of the current directory (depending on configuration).
If you run into problems, the first thing to try is running using the --verbose
argument, such as:
gallery-dl --verbose URL
Which should provide more information about what the application is doing to help you diagnose the issue.
The full list of arguments may be found here, or listed by using the --help
argument.