mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.97k stars 975 forks source link

Exhentai and metadata #984

Closed ghost closed 1 year ago

ghost commented 4 years ago

Add one JSON file with the gallery's metadata to the zip file or folder after it's done with the URL. It could be called "extractor.exhentai.metadata". Example1: https://raw.githubusercontent.com/dnsev-h/x/master/builds/x-gallery-metadata.user.js Example2: https://ehwiki.org/wiki/API#Gallery_Metadata

Example1 looks like this

mikf commented 4 years ago

This is something the metadata postprocessor should be able to do, but currently it can only work for individual files and you'd end up with one metadata file for each image.

This is something that will be possible eventually (i.e. Soon™), but for right now you'll have to run gallery-dl a second time as

$ gallery-dl --no-download --write-metadata --range 1 -o skip=false URL

to only write the metadata of the first file.

Adding it to the ZIP file will most likely never be implemented.

ghost commented 4 years ago

If you decide to implement it, please name the file "info.json" or "info.txt" because it's what other popular download methods are doing.

ghost commented 4 years ago

I've been using gallery-dl to download thousands of galleries now, and I noticed a huge conflicting problem with these two commands ["{gallery_token}-{title}"] and gallery-dl --no-download --write-metadata --range 1 -o skip=false URL. Titles on exhentai are always edited on a periodic basis. Some examples are newly published galleries, "hosho" to "hoshou" or "Dorachefu" to "Drachef" and so on. Because we have to run gallery-dl a second time with that command, it'll cause gallery-dl to create a new folder with a different name when the title is different, which means it'll put the metadata in a separate folder. This problem can be avoided by taking out {title}. It might not be a problem to most people but for some it might be.

mikf commented 1 year ago

--write-info-json (1cc73e11, v1.19.0)