wget遞歸資料夾/檔案下載僅傳回多個index.html

wget遞歸資料夾/檔案下載僅傳回多個index.html
wget --no-parent --recursive --level=4 https://www.example.com/jsons/

我正在使用上面的行嘗試下載該 URL 子資料夾中的所有檔案。

資料夾結構如下:

https://www.example.com/jsons/XX/(multiple files)

其中「XX」是各種兩位數資料夾名稱。

它正在下載所有資料夾,但僅將index.html 檔案下載到每個資料夾中。不會下載任何其他檔案(本例為 .json)。

如果我專門指定這些「XX」資料夾之一,它會按預期下載該資料夾的所有文件,包括 .json。

wget --no-parent --recursive --level=4 https://www.example.com/jsons/BS/

使用 1.21.4 並在 Windows cmd 視窗中運行它。

這是 wget 對單一資料夾的詳細輸出(片段):

--2023-07-05 20:23:52-- https://www.example.com/jsons/BL/重複使用現有連接www.example.com:443。 HTTP 請求已傳送,正在等待回應... 200 OK 長度:未指定 [text/html] 儲存至:'www.example.com/jsons/BL/index.html'

www.example.com/jsons [ <=> ] 8.95K --.-KB/s(0.001 秒)

有任何想法嗎?

相關內容