Girbons / comics-downloader

tool to download comics and manga in pdf/epub/cbr/cbz from a website
MIT License
453 stars 48 forks source link

Bad Issue # for readallcomics URLs with trailing year #118

Open kshunterco opened 1 year ago

kshunterco commented 1 year ago

Hey, back after a year or so away. Nice updates!

Describe the bug When I try to get a comic that has a year at the end of its URL from readallcomics, it believes the year is the issue #, and downloads all the comics to the same output file (overwriting in series). So... not desired behavior.

To Reproduce Steps to reproduce the behavior: ./downloader.exe -url http://readallcomics.com/category/sandman/ should do it.

Expected behavior Rather than downloading the files all to the same issue number (1989 in the above instance) it should download them to individual files.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context So I was thinking that if one (maybe me?) added a command line option to tell the code where the issue number was in the URL, it could work. The code will assume it's at the end, unless the command line option indicates it's somewhere else. I am not sure I will have time to do this (my semester is about to begin), but I can give it a shot? Lemme know if that would be welcome (a new command line option to specify the location of the issue number)...

Girbons commented 1 year ago

Hey @kshunterco nice to hear from you! 😄

it believes the year is the issue #, and downloads all the comics to the same output file (overwriting in series). So... not desired behavior.

Yeah, the current approach doesn't work sometimes, I realized that this week when I started to work again on this project.

So I was thinking that if one (maybe me?) added a command line option to tell the code where the issue number was in the URL, it could work. The code will assume it's at the end, unless the command line option indicates it's somewhere else. I am not sure I will have time to do this (my semester is about to begin), but I can give it a shot? Lemme know if that would be welcome (a new command line option to specify the location of the issue number)...

You know that any contributions is really appreciated 🚀 but if you don't have the time don't worry!

Instead of introducing a new cli option I have 2 ideas that come to my mind:

e.g

using the following url as example: http://readallcomics.com/sandman-v2-075-1989/

splitted should be something like that
["https:", "", "readallcomics.com", "sandman-v2-075-1989"]

the last slice part can be splitted again by "-"
["sandman", "v2", "075", "1989"]

now, we could pop the first element that should be the title everytime(?)
and join the other elements together to make the issue number 

Let me know what do you think 😄

kshunterco commented 1 year ago

Thanks @Girbons, good to be back! Sounds like you were away for a while too? Sometimes that can really help.

I like the second idea - the join. I have readallcomics.go opened up in vi right now, I will make that change to my version, seems like this should happen in all the sites code. I'll see what I can do, if it happens soon I'll fork and submit a pull request.

Best, Kendall

Girbons commented 1 year ago

Thanks @Girbons, good to be back! Sounds like you were away for a while too? Sometimes that can really help.

Yep it really did help!

I like the second idea - the join. I have readallcomics.go opened up in vi right now, I will make that change to my version, seems like this should happen in all the sites code. I'll see what I can do, if it happens soon I'll fork and submit a pull request.

Cool! Thank you @kshunterco

kshunterco commented 1 year ago

Hey. I'm slammed at work. I will get to this eventually. Sorry.

tabletseeker commented 5 months ago

Use this, the only working readcomiconline downloaded in 2024: https://github.com/tabletseeker/readcomic_dl