Created
March 30, 2019 08:08
-
-
Save BFDZ/ad90bb3181528e84b5a772266dab2edc to your computer and use it in GitHub Desktop.
一个简单的 bash 批量下载模版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
page_url='' | |
for ((i=1; i<=2310; i++)) | |
do | |
page_i="${page_url}$i.html" | |
mp3_i_url=$(curl -s ${page_i} |grep soundFile | awk -F\" '{print $20}') | |
mp3_i_name=$(curl -s ${page_i} |grep soundFile | awk -F\" '{print $22}') | |
curl -o "$mp3_i_name" ${mp3_i_url} | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment