-
-
Save oxUnd/1301097 to your computer and use it in GitHub Desktop.
下载gaea的m3u中的所有文件,自动完成所有转码、文件名整理操作
This file contains hidden or 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
#!/bin/bash | |
# usage: download *.m3u | |
for m3u; do | |
dos2unix -q $m3u | |
iconv -f gbk -t utf8 $m3u | while IFS=" " read line; do | |
if [ "${line:0:11}" = "#EXTINF:-1," ]; then | |
filename=`basename $m3u .m3u`-${line:11:20}.mp3 | |
read url | |
wget "$url" -O "$filename" | |
mid3iconv -e GBK "$filename" | |
fi | |
done | |
shift | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment