-
-
Notifications
You must be signed in to change notification settings - Fork 989
/
gallery-dl-example.conf
449 lines (386 loc) · 14.4 KB
/
gallery-dl-example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
{
"extractor":
{
"base-directory": "~/gallery-dl/",
"#": "set global archive file for all extractors",
"archive": "~/gallery-dl/archive.sqlite3",
"archive-pragma": ["journal_mode=WAL", "synchronous=NORMAL"],
"#": "add two custom keywords into the metadata dictionary",
"#": "these can be used to further refine your output directories or filenames",
"keywords": {"bkey": "", "ckey": ""},
"#": "make sure that custom keywords are empty, i.e. they don't appear unless specified by the user",
"keywords-default": "",
"#": "replace invalid path characters with unicode alternatives",
"path-restrict": {
"\\": "⧹",
"/" : "⧸",
"|" : "│",
":" : "꞉",
"*" : "∗",
"?" : "?",
"\"": "″",
"<" : "﹤",
">" : "﹥"
},
"#": "write tags for several *booru sites",
"postprocessors": [
{
"name": "metadata",
"mode": "tags",
"whitelist": ["danbooru", "moebooru", "sankaku"]
}
],
"pixiv":
{
"#": "override global archive path for pixiv",
"archive": "~/gallery-dl/archive-pixiv.sqlite3",
"#": "set custom directory and filename format strings for all pixiv downloads",
"filename": "{id}{num}.{extension}",
"directory": ["Pixiv", "Works", "{user[id]}"],
"refresh-token": "aBcDeFgHiJkLmNoPqRsTuVwXyZ01234567890-FedC9",
"#": "transform ugoira into lossless MKVs",
"ugoira": true,
"postprocessors": ["ugoira-copy"],
"#": "use special settings for favorites and bookmarks",
"favorite":
{
"directory": ["Pixiv", "Favorites", "{user[id]}"]
},
"bookmark":
{
"directory": ["Pixiv", "My Bookmarks"],
"refresh-token": "01234567890aBcDeFgHiJkLmNoPqRsTuVwXyZ-ZyxW1"
}
},
"danbooru":
{
"ugoira": true,
"postprocessors": ["ugoira-webm"]
},
"exhentai":
{
"#": "use cookies instead of logging in with username and password",
"cookies":
{
"ipb_member_id": "12345",
"ipb_pass_hash": "1234567890abcdef",
"igneous" : "123456789",
"hath_perks" : "m1.m2.m3.a-123456789a",
"sk" : "n4m34tv3574m2c4e22c35zgeehiw",
"sl" : "dm_2"
},
"#": "wait 2 to 4.8 seconds between HTTP requests",
"sleep-request": [2.0, 4.8],
"filename": "{num:>04}_{name}.{extension}",
"directory": ["{category!c}", "{title}"]
},
"sankaku":
{
"#": "authentication with cookies is not possible for sankaku",
"username": "user",
"password": "#secret#"
},
"furaffinity": {
"#": "authentication with username and password is not possible due to CAPTCHA",
"cookies": {
"a": "01234567-89ab-cdef-fedc-ba9876543210",
"b": "fedcba98-7654-3210-0123-456789abcdef"
},
"descriptions": "html",
"postprocessors": ["content"]
},
"deviantart":
{
"#": "download 'gallery' and 'scraps' images for user profile URLs",
"include": "gallery,scraps",
"#": "use custom API credentials to avoid 429 errors",
"client-id": "98765",
"client-secret": "0123456789abcdef0123456789abcdef",
"refresh-token": "0123456789abcdef0123456789abcdef01234567",
"#": "put description texts into a separate directory",
"metadata": true,
"postprocessors": [
{
"name": "metadata",
"mode": "custom",
"directory" : "Descriptions",
"content-format" : "{description}\n",
"extension-format": "descr.txt"
}
]
},
"kemonoparty": {
"postprocessors": [
{
"name": "metadata",
"event": "post",
"filename": "{id} {title}.txt",
"#": "write text content and external URLs",
"mode": "custom",
"format": "{content}\n{embed[url]:?/\n/}",
"#": "onlx write file if there is an external link present",
"filter": "embed.get('url') or re.search(r'(?i)(gigafile|xgf|1drv|mediafire|mega|google|drive)', content)"
}
]
},
"flickr":
{
"access-token": "1234567890-abcdef",
"access-token-secret": "1234567890abcdef",
"size-max": 1920
},
"mangadex":
{
"#": "only download safe/suggestive chapters translated to English",
"lang": "en",
"ratings": ["safe", "suggestive"],
"#": "put chapters into '.cbz' archives",
"postprocessors": ["cbz"]
},
"reddit":
{
"#": "only spawn child extractors for links to specific sites",
"whitelist": ["imgur", "redgifs"],
"#": "put files from child extractors into the reddit directory",
"parent-directory": true,
"#": "transfer metadata to any child extractor as '_reddit'",
"parent-metadata": "_reddit"
},
"imgur":
{
"#": "general imgur settings",
"filename": "{id}.{extension}"
},
"reddit>imgur":
{
"#": "special settings for imgur URLs found in reddit posts",
"directory": [],
"filename": "{_reddit[id]} {_reddit[title]} {id}.{extension}"
},
"tumblr":
{
"posts" : "all",
"external": false,
"reblogs" : false,
"inline" : true,
"#": "use special settings when downloading liked posts",
"likes":
{
"posts" : "video,photo,link",
"external": true,
"reblogs" : true
}
},
"twitter":
{
"#": "write text content for *all* tweets",
"postprocessors": ["content"],
"text-tweets": true
},
"ytdl":
{
"#": "enable 'ytdl' extractor",
"#": "i.e. invoke ytdl on all otherwise unsupported input URLs",
"enabled": true,
"#": "use yt-dlp instead of youtube-dl",
"module": "yt_dlp",
"#": "load ytdl options from config file",
"config-file": "~/yt-dlp.conf"
},
"mastodon":
{
"#": "add 'tabletop.social' as recognized mastodon instance",
"#": "(run 'gallery-dl oauth:mastodon:tabletop.social to get an access token')",
"tabletop.social":
{
"root": "https://tabletop.social",
"access-token": "513a36c6..."
},
"#": "set filename format strings for all 'mastodon' instances",
"directory": ["mastodon", "{instance}", "{account[username]!l}"],
"filename" : "{id}_{media[id]}.{extension}"
},
"foolslide": {
"#": "add two more foolslide instances",
"otscans" : {"root": "https://otscans.com/foolslide"},
"helvetica": {"root": "https://helveticascans.com/r" }
},
"foolfuuka": {
"#": "add two other foolfuuka 4chan archives",
"fireden-onion": {"root": "http://ydt6jy2ng3s3xg2e.onion"},
"scalearchive" : {"root": "https://archive.scaled.team" }
},
"gelbooru_v01":
{
"#": "add a custom gelbooru_v01 instance",
"#": "this is just an example, this specific instance is already included!",
"allgirlbooru": {"root": "https://allgirl.booru.org"},
"#": "the following options are used for all gelbooru_v01 instances",
"tag":
{
"directory": {
"locals().get('bkey')": ["Booru", "AllGirlBooru", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
"" : ["Booru", "AllGirlBooru", "Tags", "_Unsorted", "{search_tags}"]
}
},
"post":
{
"directory": ["Booru", "AllGirlBooru", "Posts"]
},
"archive": "~/gallery-dl/custom-archive-file-for-gelbooru_v01_instances.db",
"filename": "{tags}_{id}_{md5}.{extension}",
"sleep-request": [0, 1.2]
},
"gelbooru_v02":
{
"#": "add a custom gelbooru_v02 instance",
"#": "this is just an example, this specific instance is already included!",
"tbib":
{
"root": "https://tbib.org",
"#": "some sites have different domains for API access",
"#": "use the 'api_root' option in addition to the 'root' setting here"
}
},
"tbib": {
"#": "the following options are only used for TBIB",
"#": "gelbooru_v02 has four subcategories at the moment, use custom directory settings for all of these",
"tag":
{
"directory": {
"locals().get('bkey')": ["Other Boorus", "TBIB", "Tags", "{bkey}", "{ckey}", "{search_tags}"],
"" : ["Other Boorus", "TBIB", "Tags", "_Unsorted", "{search_tags}"]
}
},
"pool":
{
"directory": {
"locals().get('bkey')": ["Other Boorus", "TBIB", "Pools", "{bkey}", "{ckey}", "{pool}"],
"" : ["Other Boorus", "TBIB", "Pools", "_Unsorted", "{pool}"]
}
},
"favorite":
{
"directory": {
"locals().get('bkey')": ["Other Boorus", "TBIB", "Favorites", "{bkey}", "{ckey}", "{favorite_id}"],
"" : ["Other Boorus", "TBIB", "Favorites", "_Unsorted", "{favorite_id}"]
}
},
"post":
{
"directory": ["Other Boorus", "TBIB", "Posts"]
},
"archive": "~/gallery-dl/custom-archive-file-for-TBIB.db",
"filename": "{id}_{md5}.{extension}",
"sleep-request": [0, 1.2]
},
"urlshortener": {
"tinyurl": {"root": "https://tinyurl.com"}
}
},
"downloader":
{
"#": "restrict download speed to 1 MB/s",
"rate": "1M",
"#": "show download progress indicator after 2 seconds",
"progress": 2.0,
"#": "retry failed downloads up to 3 times",
"retries": 3,
"#": "consider a download 'failed' after 8 seconds of inactivity",
"timeout": 8.0,
"#": "write '.part' files into a special directory",
"part-directory": "/tmp/.download/",
"#": "do not update file modification times",
"mtime": false,
"ytdl":
{
"#": "use yt-dlp instead of youtube-dl",
"module": "yt_dlp"
}
},
"output":
{
"log": {
"level": "info",
"#": "use different ANSI colors for each log level",
"format": {
"debug" : "\u001b[0;37m{name}: {message}\u001b[0m",
"info" : "\u001b[1;37m{name}: {message}\u001b[0m",
"warning": "\u001b[1;33m{name}: {message}\u001b[0m",
"error" : "\u001b[1;31m{name}: {message}\u001b[0m"
}
},
"#": "shorten filenames to fit into one terminal line",
"#": "while also considering wider East-Asian characters",
"shorten": "eaw",
"#": "enable ANSI escape sequences on Windows",
"ansi": true,
"#": "write logging messages to a separate file",
"logfile": {
"path": "~/gallery-dl/log.txt",
"mode": "w",
"level": "debug"
},
"#": "write unrecognized URLs to a separate file",
"unsupportedfile": {
"path": "~/gallery-dl/unsupported.txt",
"mode": "a",
"format": "{asctime} {message}",
"format-date": "%Y-%m-%d-%H-%M-%S"
}
},
"postprocessor":
{
"#": "write 'content' metadata into separate files",
"content":
{
"name" : "metadata",
"#": "write data for every post instead of each individual file",
"event": "post",
"filename": "{post_id|tweet_id|id}.txt",
"#": "write only the values for 'content' or 'description'",
"mode" : "custom",
"format": "{content|description}\n"
},
"#": "put files into a '.cbz' archive",
"cbz":
{
"name": "zip",
"extension": "cbz"
},
"#": "various ugoira post processor configurations to create different file formats",
"ugoira-webm":
{
"name": "ugoira",
"extension": "webm",
"ffmpeg-args": ["-c:v", "libvpx-vp9", "-an", "-b:v", "0", "-crf", "30"],
"ffmpeg-twopass": true,
"ffmpeg-demuxer": "image2"
},
"ugoira-mp4":
{
"name": "ugoira",
"extension": "mp4",
"ffmpeg-args": ["-c:v", "libx264", "-an", "-b:v", "4M", "-preset", "veryslow"],
"ffmpeg-twopass": true,
"libx264-prevent-odd": true
},
"ugoira-gif":
{
"name": "ugoira",
"extension": "gif",
"ffmpeg-args": ["-filter_complex", "[0:v] split [a][b];[a] palettegen [p];[b][p] paletteuse"]
},
"ugoira-copy": {
"name": "ugoira",
"extension": "mkv",
"ffmpeg-args": ["-c", "copy"],
"libx264-prevent-odd": false,
"repeat-last-frame": false
}
},
"#": "use a custom cache file location",
"cache": {
"file": "~/gallery-dl/cache.sqlite3"
}
}