[英]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.