shell脚本查询百度收录及alexa排名
shell批量查询网站的排名及收录情况..多个网站依葫芦画瓢就可以,不是什么好东西,自己乱搞一通,为的就是方便.用到的工具有curl跟wget,把路径换成你自己的,就可以用了..
- #!/bin/bash
- cd /root/get_site_info
- $(curl http://alexa.chinaz.com/?domain=baiqiuyi.com -o alexa.temp && cat alexa.temp |iconv -f gb2312 -t utf8|grep 综合排名|sed -e 's/<[^>]*>//g' -e 's/^[ \t]*//g' -e 2d > today.result && rm alexa.temp)
- $(wget -q http://www.baidu.com/s?wd=site%3Abaiqiuyi.com -O baiqiuyi.temp)
- $(cat baiqiuyi.temp|iconv -f gb2312 -t utf8 -o baiqiuyi.html || rm baiqiuyi.temp)
- $(sed -e '/百度一下/!d' -e 's/<[^>]*>//g' -e 's/ //g' -e '1,2d' baiqiuyi.html >> today.result && echo $(date) >> today.result && rm baiqiuyi.html)
- clear
- cat /root/get_site_info/today.result
- #wall <<EOF
- #search from web are Done!
- #EOF
shell编程,还没怎么尝试过,有些朋友还在推荐python,
代码应该还是比较好玩的吧
回复:python很强哦~
呵呵,这工具不错,查询收录真不错~~
回复:方便点嘛..
恩恩 小有所成… 我顶
回复:…
域名查询,这个很有用啊。
老大春光明媚啊!
^_^
回复:一起进步!