Skip to content

Instantly share code, notes, and snippets.

@BFDZ
Created March 30, 2019 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFDZ/ad90bb3181528e84b5a772266dab2edc to your computer and use it in GitHub Desktop.
Save BFDZ/ad90bb3181528e84b5a772266dab2edc to your computer and use it in GitHub Desktop.
一个简单的 bash 批量下载模版
#!/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