使用 wget 创建目录

问题描述 投票:0回答:1

我需要使用

wget -r -l 1 -nd -H --accept-regex 'https://blogspot.com/s[0-9]{4}/[0-9]{3}.pdf' -i list.txt
从多个页面下载文件;在 TXT 文件中,我有一个需要下载的所有页面的列表,每行一个,例如

https://blogspot.com/test/001

https://blogspot.com/test/002

等等。

我尝试为每个源创建不同的文件夹,以便从

https://blogspot.com/test/001
下载的所有文件都位于名为 001 的文件夹中,从
https://blogspot.com/test/002
下载的所有文件都位于名为 002 的文件夹中,依此类推。

我怎样才能做到这一点?

wget
1个回答
-1
投票
cat list.txt | while read line
do 
   wget -r -l 1 -nd -H --accept-regex 'https://blogspot.com/s[0-9]{4}/[0-9]{3}.pdf' -i $line
done
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.