Girbons / comics-downloader

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

EOF Errors #87

Closed kshunterco closed 2 years ago

kshunterco commented 2 years ago

Is your feature request related to a problem? Please describe. Hey, being new to downloading comics with this code, it's frequently useful to use the -all switch. However when I do that with large (>100 issue) collections I often get a run-ending error like this: time="2021-07-07T20:10:38-06:00" level=error msg=EOF I believe - but am not sure - this occurs in func download, specifically in the loop over the URLs - my guess is (and I could use to learn how to debug running go programs!) that the collection list of comic objects gets "overfilled". I'm running under Win10, so it might just be a windows thing.

Describe the solution you'd like I think if the comics were parsed into smaller collections (whether the -range or -all option was specified) and then were created in series for download, this would fix the problem. I'm not sure that's the best way to implement this (could take some substantial changes / rearranging the code). But I'm willing to take it on... could be fun!

Describe alternatives you've considered Well... I use cygwin and run tcsh, so I can create a foreach loop that has ranges in it like foreach range ( '1-10' '11-21' ... ) and feed each smaller range to the executable. This works, I don't get the EOF error, but I am not sure it catches weird issue numbers like "22.5"... seems like the regex that looks at numbers might see "22.5" as 225 (but let me check on that again). So that's another, minor issue I'd like to try to sort out: how the range parser treats decimal issue numbers (if it actually needs to be sorted out!!).

Additional context Not sure of any additional context. I am a long time engineering programmer and am trying to learn go better, and this would give me something to do, but the end result might not be especially beautiful from a computer scientist perspective LOL... I certainly am open to improving my algorithmic knowledge.

Girbons commented 2 years ago

Hey @kshunterco,

I'm not sure that the EOF is due to the collections being too large, in that case a different error would be raised IMHO. I think that It could be something related to too many connections opened with the server, (https://github.com/Girbons/comics-downloader/blob/master/pkg/core/core.go#L262#L300) just an hypothesis, it needs to be investigated.

kshunterco commented 2 years ago

Hey @kshunterco,

I'm not sure that the EOF is due to the collections being too large, in that case a different error would be raised IMHO.

Thanks @Girbons, I'm on vacation (good time to play with golang) but the internet is poor (bad time to use a bot LOL)... I'll look into the possibilities later in the summer and report back.

Girbons commented 2 years ago

@kshunterco don't worry, enjoy your vacation 😄

Girbons commented 2 years ago

@kshunterco I'm closing this due to inactivity, feel free to reopen!