Last active
December 21, 2015 12:09
-
-
Save viko16/6304227 to your computer and use it in GitHub Desktop.
QQ空间批量点赞 #javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ilike() { | |
var j = document.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10"); | |
var count = 0; | |
for (var i = count; i < j.length; i++) { | |
if (j[i].innerHTML.slice(0, 1) == "赞") { | |
j[i].click(); | |
count++; | |
} | |
} | |
window.document.body.scrollTop = window.document.body.scrollHeight - 1000; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 200; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 800; | |
window.document.body.scrollTop = window.document.body.scrollHeight; | |
if(document.getElementsByClassName('check_more bor bg2')[2].childNodes[0].innerHTML=='没有更多动态显示'){ | |
return; | |
} | |
document.getElementsByClassName('check_more c_tx bor')[0].click(); | |
window.document.body.scrollTop = window.document.body.scrollHeight - 1000; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 200; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 800; | |
window.document.body.scrollTop = window.document.body.scrollHeight; | |
console.log("已执行"+count+"条"); | |
setTimeout("ilike()", 2000); | |
}setTimeout("ilike()", 2000); | |
/* | |
科大神打造,自动滚动版本,点赞直到尽头(好友太多的勿试,本代码不负任何因点赞过多而被好友砍死的责任!) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ilike() { | |
var j = document.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10"); | |
var count = 0; | |
for (var i = count; i < j.length; i++) { | |
if (j[i].innerHTML.slice(0, 1) == "赞") { | |
j[i].click(); | |
count++; | |
} | |
} | |
if(document.getElementsByClassName('check_more bor bg2')[2].childNodes[0].innerHTML=='没有更多动态显示'){ | |
return; | |
}else{ | |
if(window.document.body.scrollHeight-window.document.body.scrollTop<1000){ | |
document.getElementsByClassName('check_more c_tx bor bg2')[0].click(); | |
} | |
} | |
window.document.body.scrollTop = window.document.body.scrollHeight - 1000; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 200; | |
window.document.body.scrollTop = window.document.body.scrollHeight - 800; | |
window.document.body.scrollTop = window.document.body.scrollHeight; | |
console.log("已执行"+count+"条"); | |
setTimeout("ilike()", 2000); | |
}setTimeout("ilike()", 2000); | |
/* | |
科神出品,批量点赞+自动滚动 稳定版 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var j = document.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10"); | |
var count = 0; | |
for (var i = 0; i < j.length; i++) | |
{ | |
j[i].click(); | |
count++; | |
} | |
console.log("已点"+count+"个赞!"); | |
/* | |
绝对的简单粗暴,批量点赞 | |
*/ | |
var j = document.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10"); | |
var count = 0; | |
for (var i = 0; i < j.length; i++) | |
{ | |
if (j[i].innerHTML.slice(0,1)=="赞") | |
{ | |
j[i].click(); | |
count++; | |
} | |
} | |
console.log("丧心病狂地点了" + count + "个赞!"); | |
/* | |
排除了不小心取消了赞的情况 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var j = document.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10"); | |
var count = 0; | |
for (var i = 0; i < j.length; i++) | |
{ | |
if (j[i].innerHTML.slice(0,3)=="取消赞") //截取前三个字 | |
{ | |
j[i].click(); | |
count++; | |
} | |
} | |
console.log("取消了" + count + "个赞!"); | |
/* | |
批量取消赞,消除因点赞太多而被人砍死的风险 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var j = document.getElementsByClassName("nickname q_namecard c_tx ui_mr5"); | |
var count = 0; | |
for (var i = 0; i < j.length; i++) | |
{ | |
if (j[i].innerHTML=='。"尛海賊ポ!') //判断人名 | |
{ | |
j[i].parentNode.parentNode.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10")[0].click(); //根据Q空间的dom结构 | |
count++; | |
} | |
} | |
console.log("点了自己"+count+"个赞!"); | |
/* | |
根据人名来判断 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 10; i++) { | |
document.getElementsByClassName('check_more c_tx bor bg2')[0].click(); | |
} | |
/* | |
自动点击“加载更多”,执行10次 | |
*/ | |
var k = document.getElementsByClassName("nickname q_namecard c_tx ui_mr5"); | |
console.log("共有" + k.length + "条说说。"); | |
/* | |
检查页面上共刷新出了多少条说说 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var authors = document.getElementsByClassName("nickname q_namecard c_tx ui_mr5"); | |
var like_list = new Array("nba", "小米手机"); //要点赞的人名 | |
var count = 0; | |
for (var i = 0; i < authors.length; i++) { | |
for (var j = 0; j < like_list.length; j++) { | |
if (authors[i].innerHTML.toLowerCase().indexOf(like_list[j])!=-1) { | |
var x = authors[i].parentNode.parentNode.getElementsByClassName("qz_like_btn_v3 _likeBtn c_tx ui_mr10")[0]; | |
if (x.innerHTML.slice(0,1)=="赞") { | |
x.click(); | |
count++; | |
} | |
} | |
} | |
} | |
console.log("成功点赞了名单中"+like_list.length+"个人,共"+count+"条说说。"); | |
/* | |
按名单来点赞,杜绝了误点“取消赞”的可能 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment