Yesterday saw a micro-blog: "22 line of JavaScript code to achieve the QQ group member extractor. The spirit of curiosity to click in, found no effect, one is the QQ version upgrade, the second is the code inside the blog is also a bit cumbersome.
So I try to write a, calculate above 9 lines, though small, spite.
Copy Code code as follows:
var ids = Document.queryselectorall (". member_id");
var names = Document.queryselectorall (". Member_name");
var output = "", length = ids.length;
for (var i=0; i<length; i++) {
Output + + ids[i].innerhtml.slice (1,-1) + ":" + names[i].innerhtml + "\ n";
}
Console.log (output);
How to use
Advanced such as QQ group space, directly into the can point this link: http://qun.qzone.qq.com, if you want to get group information, first you must be a group member.
After logging in, the top menu has "my group" and selects a group in the secondary menu. Click on "group members" again.
Press F12, bring up the developer tools, and select the JavaScript console. (If you use Chrome, you can just press Ctrl + Shift + J).
Put that piece of code in here, enter!
Copy Code code as follows:
var ids = Document.queryselectorall (". member_id");
var names = Document.queryselectorall (". Member_name");
var output = "", length = ids.length;
for (var i=0; i<length; i++) {
Output + + ids[i].innerhtml.slice (1,-1) + ":" + names[i].innerhtml + "\ n";
}
Console.log (output);
If it feels too troublesome to copy to copy, I made a bookmark.
Drag the link below to the Bookmarks bar: Get QQ Group members
Then you can go into the group Address Book--> Ctrl + Shift + J--> Click on the tab bar--> copy.
Note: This code is only for study and research use.