mikf / gallery-dl

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

MangaSee extractor misinterprets .5 chapter number #6203

Closed garbindoubler closed 1 month ago

garbindoubler commented 1 month ago

Take the following example:

https://mangasee123.com/read-online/Spy-X-Family-chapter-84.5.html

The chapter number is 84.5, i.e. an intermediary chapter. But when downloading with gallery-dl with a directory path of {manga} c{chapter:>03}, it downloads images as:

./gallery-dl/Spy x Family c084/Spy x Family_c084.5_001.jpg
./gallery-dl/Spy x Family c084/Spy x Family_c084.5_002.jpg
...

Note how the folder says 084, not 084.5. Which is a problem, because in the postprocessor step I compress the folder to a CBZ with the folder name. Meaning that downloading chapter 84 and 84.5 will make gallery-dl think it's the same thing.

While searching around I found https://github.com/mikf/gallery-dl/commit/32d2e686c2c0425310e9c8119dad599f02795c36. Then looking at the MangaSee extractor I think the problem may be related: gallery-dl interpreting the chapter number as an integer when it shouldn't.

I'm not much of a Python person. I tried fiddling with it to make a PR but failed to make working code, so reporting instead.

mikf commented 1 month ago

The .5 minor version is available as {chapter_minor}, which is used in the default format strings:

$ gallery-dl -E https://mangasee123.com/read-online/Spy-X-Family-chapter-84.5.html
Category / Subcategory
  "mangasee" / "chapter"

Filename format (default):
  "{manga}_c{chapter:>03}{chapter_minor:?//}_{page:>03}.{extension}"

Directory format (default):
  ["{category}", "{manga}", "{volume:?v/ />02}c{chapter:>03}{chapter_minor:?//}{title:?: //}"]
garbindoubler commented 1 month ago

Thank you very much. I will keep the -E, --extractor-info flag in mind for the future.