浏览器控制台
ia=document.getElementsByTagName("a");console.log(ia[3]);console.log(ia[5]);ia[30].click();var t=30; for(var ii=0;ii<t;ii++){ia[ii].click();}
<a href="javascript:void(0);" class="W_btn_b6 W_fr" action-data="type=followed&refer_lflag=10201_" wforce="0" uid="24493" action-type="follow" suda-data="key=tblog_search_user&value=user_feed_3_follow"><em title="关注" class="W_ficon ficon_add S_ficon">+</em>关注</a>
- 62: a.W_linkb
- 63: a.W_linkb
- 64: a.W_linkb
- 65: a
- 66: a.W_btn_b6.W_fr
- 67: a.W_texta.W_fb
- 68: a.W_linkb
- 69: a.W_linkb
- 70: a.W_linkb
- 71: a.W_linkb
- 72: a
- 73: a.W_btn_b6.W_fr
- 74: a.W_texta.W_fb
- 75: a.W_linkb
- 76: a.W_linkb
- 77: a.W_linkb
- 78: a.W_linkb
- 79: a.W_linkb
- 80: a.searchBtn
- 81: a.W_fr.change.W_btn_b6
- 82: a.history_txt.W_texta
- 83: a.W_close_color.W_texta
- 84: a.history_txt.W_texta
- 85: a.W_close_color.W_texta
- 86: a.ico_service
- 87: a
- 88: a
- 89: a
- 90: a
- 91: a
- 92: a
- 93: a
- 94: a.S_txt2
- 95: a.S_txt2
- 96: a.W_gotop.S_ficon_bg
- 97: a.btn_a
- 98: a.btn_b
- 99: a.mini_btn_area.pause_state
- [100 … 120]
- __proto__: HTMLCollection
https://weibo.cn/123/fans
function mcg(i){console.log(i);};;var ia=document.getElementsByTagName("a");var len=ia.length;for(var i=0;i<len;i++){var it=ia[i];try{itnv=it.firstChild.nodeValue;if(itnv.indexOf("注")>0 && itnv.indexOf("已")<0 && 21>3){if(31>5){setTimeout(it.click(),Math.ceil(Math.random()*1000*6*5));}};}catch(err){}};
function mcg(i){console.log(i);};var ia=document.getElementsByTagName("a");var len=ia.length;for(var i=0;i<len;i++){var it=ia[i];try{ithref=it.href;ittxt=it.text;if(ithref.indexOf("javascript:;")>=0 && ittxt.indexOf("+关注")>=0){mcg(i);mcg(it);if(i%3==0){continue;};if(31>5){setTimeout(it.click
(),Math.ceil(Math.random()*1000*60*10));}};}catch(err){};};
function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } };function clg(i){console.log(i);};for(i=0;i<Math.ceil(Math.random()*50);i++){sleep(1000);window.scrollTo(0,document.body.scrollHeight)};{}ia=document.getElementsByTagName("a");len=ia.length;for(i=0;i<len;i++){if(i%(Math.ceil(Math.random()*10))==0){continue;};ii=ia[i];;try{ittxt=ii.text;iihf=ii.href;if(ittxt.indexOf("关注")>=0 && ittxt.indexOf("已")<0 && iihf.length==0){clg(ii);clg(i);sleep(Math.ceil(Math.random()*1000*0.03));ii.click();};}catch(err){};};
function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } };function clg(i){console.log(i);};for(i=0;i<Math.ceil(Math.random()*50);i++){sleep(Math.ceil(Math.random()*1000*10));window.scrollTo(0,document.body.scrollHeight)};{}ia=document.getElementsByTagName("a");len=ia.length;for(i=0;i<len;i++){if(i%(Math.ceil(Math.random()*10))==0){continue;};ii=ia[i];;try{ittxt=ii.text;iihf=ii.href;if(ittxt.indexOf("关注")>=0 && ittxt.indexOf("已")<0 && iihf.length==0){clg(ii);clg(i);sleep(Math.ceil(Math.random()*1000*0.03));ii.click();};}catch(err){};};
function gen_random_int(max) {
return Math.ceil(Math.random() * max)
}
function sleep(numberMillis) {
var now = new Date()
var exitTime = now.getTime() + numberMillis
while (true) {
now = new Date()
if (now.getTime() > exitTime) return
}
}
function sleep_max(max) {
numberMillis = gen_random_int(max)
sleep(numberMillis)
}
function c(i) {
console.log(i)
}
var ia = document.getElementsByClassName("ficon_add")
var len = ia.length
for (var i = 0; i < len; i++) {
var it = ia[i]
try {
var itint = parseInt(ia[i].parentNode.parentNode.parentNode.parentNode.getElementsByClassName("count")[2].outerText)
} catch (err) {
c(err)
continue
}
// 过滤图片恶意用户
if (itint < 60) {
continue
}
try {
sleep_max(20)
it.click()
} catch (err) {
c(err)
}
}