|
#!/bin/sh
# By 6e [email protected]
# By sasadong [email protected]
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 ] |
|