Yesterday I saw a Weibo post: "22 lines of JavaScript code to implement QQ group member extractor". I clicked in out of curiosity and found that the effect was not achieved. First, the QQ version was upgraded, and second, the code in the blog was also a bit cumbersome.
So I tried to write one, and it only had 9 lines including empty lines. Although the sparrow is small, it has all the internal organs.
var ids = document.querySelectorAll(".member_id") ;
var names = document.querySelectorAll(".member_name");
var output = "", length = ids.length;
for(var i=0; ioutput = ids[i].innerHTML.slice(1,-1) ":" names[i].innerHTML "n";
}
console.log(output);
Usage
Advanced like QQ group space, you can click this link to enter directly: http://qun.qzone.qq.com, if you want to get group information, first You must be a group member.
After logging in, there is [My Group] in the top menu. Select a group in the sub-menu. Then click [Group Members].
Press F12 to bring up the developer tools, and then select [javascript console]. (If using Chrome, you can just press Ctrl Shift J).
Paste the code below and press Enter!
var ids = document.querySelectorAll(".member_id") ;
var names = document.querySelectorAll(".member_name");
var output = "", length = ids.length;
for(var i=0; ioutput = ids[i].innerHTML.slice(1,-1) ":" names[i].innerHTML "n";
}
console.log(output);
If you find it too troublesome to copy over and over again, I made a bookmark.
Drag the following link to the bookmark bar: Get QQ group members
Then you can enter the group address book --> Ctrl Shift J --> Click the label bar -- > Copy.
Note: This code is for study and research only.