繁体   English   中英

wget不必要地下载index.html并暂停批处理脚本(Windows)

[英]wget downloads index.html unnecessarily and halts batch script (Windows)

我在Windows上使用wget64遇到麻烦:

@echo OFF
FOR /L %%i in (1, 1, 9999) DO (
cls
echo Downloading file %%i
wget64.exe -e robots=off --progress=bar --show-progress -r -np -nd -nc -HDfilepi.com --content-disposition -a wget.log ebooks.info/book/%%i/
)

wget将下载index.html (我认为这是不必要的),然后继续进入托管文件并下载该文件(如果该文件在目标位置不存在),但将无法检索下一本书的index.html并启动该文件。下次下载。

是否真的需要下载index.html ,如果是这种情况,我如何告诉wget每次删除并下载新文件?

免责声明:我只是在问wget的特定行为,我不是在寻求帮助帮助下载脚本,也不是在纵容非法下载文件。

我认为您可能对此事有所思考。 假设wget正在检索的所有其他文件都是正确的文件,因为无论如何您都在使用FOR循环,为什么不这样删除每次迭代中的index.html呢?

@echo OFF
FOR /L %%i in (1, 1, 9999) DO (
cls
echo Downloading file %%i
wget64.exe -e robots=off --progress=bar --show-progress -r -np -nd -nc -HDfilepi.com --content-disposition -a wget.log ebooks.info/book/%%i/
if exist index.html del index.html
)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM