|
发表于 2006-4-20 18:16:22
|
显示全部楼层
不能用.......
getchannel脚本如下,是不是有错误???
试了一下自己手动run脚本里面的每句代码
wget能取下index.html
但生成temp.htm和urlist还有chlist,urllist,channellist都是0字节,..................
#!/bin/bash
mkdir -p ~/.sopcast
rm index.htm* -f
wget -q http://www.sopcast.org/channel/ -O ~/.sopcast/index.html
cat ~/.sopcast/index.html |grep sop://sop.sopcast.org >~/.sopcast/temp.htm
grep -o 'sop://[a-zA-Z0-9./?=%_-:~]*' ~/.sopcast/temp.htm > ~/.sopcast/urllist
sed -e 's/<\/td>/,/g' ~/.sopcast/temp.htm |sed -e 's/<[^>]*>//g'|sed -e 's/,,/,/g'|sed -e 's/play,//g' > ~/.sopcast/chlist
paste ~/.sopcast/chlist ~/.sopcast/urllist >~/.sopcast/channellist
rm ~/.sopcast/index.html ~/.sopcast/temp.htm ~/.sopcast/chlist ~/.sopcast/urllist |
|