
Google了半天,看的还是不太明白。
哪位大大,可以跟俺举个例子吗,谢了!

最好能完整点,俺怀疑俺搜到的方法都是不完整的,或是哪里的符号打错了。
代码: 全选
==UserScript==
// @name Google Search Cookie Cleaner
// @namespace http://userscripts.org/scripts/show/6984
// @description Clean your Google Cookie
// @include http://www.google.*/search?*
// @include http://google.*/search?*
// ==/UserScript==
(function(){
var g2 = {
DeleteCookies: function() {
var domain = location.host.match(/google\..+$/)[0];
document.cookie = 'SID=; domain=.'+domain+'; path=/';
document.cookie = 'S=; domain=.'+domain+'; path=/';
document.cookie = 'SS=; domain=.'+domain+'; path=/';
document.cookie = 'LSID=; path=/accounts';
document.cookie = 'TZ=; domain=.'+domain+'; path=/';
document.cookie = 'GoogleAccountsLocale_session=; domain=.'+domain+'; path=/accounts/';
document.cookie = 'PREF=; domain=.'+domain+'; path=/';
},
init : function(){
this.DeleteCookies();
}
}
g2.init();
})();
代码: 全选
while :;do w3m -no-cookie -dump $url >/dev/null;done
代码: 全选
while :;do w3m -no-cookie -dump $url >/dev/null;sleep 1m;done
代码: 全选
i=1;while :;do w3m -no-cookie -dump $url >/dev/null;echo $i;((i++));[[ $i=101 ]]&&break;done
代码: 全选
#!/bin/bash
if [ ! $1 ]
then
echo "没有网址刷什么阿?"
exit
fi
url=$1
ci=${2:-10}
echo "刷新$url $ci次"
i=1;while :;do w3m -no-cookie -dump $url >/dev/null;echo $i;[ $i = $ci ]&&break;((i++));done