Created
October 10, 2013 08:28
-
-
Save ipconfiger/6914942 to your computer and use it in GitHub Desktop.
获取QQ群成员的脚本
This file contains hidden or 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 send_sync(qq,nick){ | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'sync url', true); | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
xhr.onload = function () { | |
console.log(qq+"("+nick+") sync "+this.responseText); | |
}; | |
xhr.send('qq='+qq+'&nick='+nick); | |
} | |
function fetch(){ | |
var elm=document.getElementsByClassName("s_members_list members_list"); | |
var members=elm[0].childNodes[0].childNodes; | |
for (var i=0;i<members.length;i++){ | |
var member=members[i].childNodes[0].childNodes[1]; | |
var qq_number=member.childNodes[1].innerText.replace("(","").replace(")",""); | |
var nick=member.childNodes[0].innerText; | |
//send_sync(qq_number,nick); do what you want | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment