喜欢的人就知道怎么用。呵呵,enjoy it。
#!/bin/sh# By 6e sixwings@gmail.com
# By sasadong sasadong@21cn.com
wget http://list.mp3.baidu.com/topso/mp3topsong.html
cat mp3topsong.html| tr \" \\n | pcregrep tsomp3.htm$ > list.raw
CC=1
for VAL in `cat list.raw`
do
wget http://list.mp3.baidu.com/topso/$VAL -O $CC.html &
usleep 100
CC=`expr $CC + 1`
done
NUM=`cat list.raw | wc -l`
CC=1
while [ $CC -le $NUM ]
do
URL=`cat $CC.html| tr \" \\\n | pcregrep ^请点击左键!来源网址: | pcregrep 请参照百度权利声明使用$ | tr[:space:] \\\n | pcregre
p ^http:// |pcregrep .mp3$ | head -1`
TITLE=`head -8 $CC.html | pcregrep '^<title>'| perl -pe 's/<title>(.*)_(.*)<\/title>/$2/g' | tr -d ' '`
echo $URL
echo $URL >> mp3file.list
wget "$URL" -O $TITLE.mp3 &
sleep 10
CC=`expr $CC + 1`
done
[ Last edited by sasadong on 2005-10-27 at 21:46 ] Originally posted by sasadong at 2005-10-27 21:33:
#!/bin/sh
# By sasadong sasadong@21cn.com
wget http://list.mp3.baidu.com/topso/mp3topsong.html
cat mp3topsong.html| tr \\\" \\\\n | pcregrep tsomp3.htm$ > lis ...
声明一下,由http://www.wespoke.com/archives/download/baidu500.sh.txt修改。
[ Last edited by sasadong on 2005-10-27 at 21:45 ] 的确如此 没理解错的话是自动下载百度最新MP3歌曲的shell脚本
可惜这里用linux的人极少。
页:
[1]