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

How to record torrent information #4396

Closed gcfvfhg closed 1 year ago

gcfvfhg commented 1 year ago

I want to record e-hentai gallery information

I use the following command gallery-dl --no-download --write-info-json http//exhentai.org/

I hope the torrent information was also included

example: http //e-hentai.org/g/2634822/f78fa7c65f/

I hope gallery-dl also record the following three URLs in the gallerytorrents link(http //e-hentai.org/gallerytorrents.php?gid=2634822&t=f78fa7c65f)

http //ehtracker.org/get/2059426/6a47a6bdcd1c0e42efe866d64f5e3a4667e3d6f2.torrent http //ehtracker.org/get/2059426/72971cbecef582a4398419ae1c893b827338607d.torrent http //ehtracker.org/get/2059426/e1b4619eb5c5c59b8892ef637a4a1666e4dc3936.torrent

Is there any existing function that can do it?

mikf commented 1 year ago

Enable the metadata option.

gallery-dl -o metadata=1 --no-download --write-info-json http*//exhentai.org/*

You might also want to use --range 0 if you are only writing gallery metadata.

gcfvfhg commented 1 year ago

Thanks Sorry, I seem to be asking a stupid question I searched directly with github a few hours ago Poor search results I didn't expect

Can I confirm that the " -o metadata=1 " is "-o extractor.exhentai.metadata=true"?

gallery-dl -o extractor.exhentai.metadata=true --no-download --write-info-json --range 0 http*****

I just ran the result, it's fine i just wanted to make sure I didn't make a mistake

gcfvfhg commented 1 year ago

1.

  "exhentai":
    {
      "metadata": true
    },

2.

gallery-dl -o extractor.exhentai.metadata=true

Do 1 and 2 have the same meaning?

mikf commented 1 year ago

Can I confirm that the " -o metadata=1 " is "-o extractor.exhentai.metadata=true"?

For exh galleries, -o metadata=1 and -o extractor.exhentai.metadata=true have the exact same effect. metadata=1 enables the metadata option globally instead of just for exh, but that doesn't matter if all you're using is an exh URL. And it's less characters to type.

Do 1 and 2 have the same meaning?

They are exactly the same.