ccloli / E-Hentai-Downloader

Download E-Hentai archive as zip file
GNU General Public License v3.0
1.82k stars 137 forks source link

How can I keep downloads for slow speed original URLs? #258

Open KOBJING opened 8 months ago

KOBJING commented 8 months ago

When I occasionally encounter an original URL with an incredibly slow download speed, such as only 0KB/s to 10KB/s, can I prevent the download from being interrupted and giving a Network Error? I have the script set to not abort, but it disconnects. The script seems to keep retraying the same original image URL over and over again, and although the Limits Cost is consumed each time, it disconnects again, and the download cannot be completed. Is there any way left for me to get it to not disconnect at any slow download speed? Or can I resume the download from the middle of the process when I retry? I would like the download to complete no matter how unstable and time consuming the connection is...

ccloli commented 8 months ago

can I prevent the download from being interrupted and giving a Network Error?

If you've set timeout to 0 and didn't enable abort at low speed, then the script won't disconnect actively. The reason could be the client or server kill the connection, or there's a fatal error in the network chain, and you can do nothing about that.

The script seems to keep retraying the same original image URL over and over again, and although the Limits Cost is consumed each time, it disconnects again, and the download cannot be completed.

When the script retrys, it'll reuse the redirected url which will not cost again, unless it keeps failed for multiple time (default is 3).

Is there any way left for me to get it to not disconnect at any slow download speed?

Probably set a proxy or vpn may resolve some cases.

Or can I resume the download from the middle of the process when I retry?

Due to the limitation of GM api, there's no way to do that, but you can try other CLI or GUI tool that not running in a browser like gallery-dl, which should handle the case nicely.