Location>code7788 >text

Batch export your penguin friends with one click.

Popularity:945 ℃/2024-09-22 19:19:05

Boi

  • fig. beginning
  • managerial

Batch export your penguin friends with one click.

Batch export your penguin friends with one click.

Attach the original author's code first

/**
     * @author ius.
     * @date 2022/8/1
     * @introduction gainQQFriends List
     */
    function getCookie(aim) {
        const allText = (/\s*/g, ''); //
        oneText = (";");
        for (var two of oneText) {
            const three = ("=");
            if (aim === three[0]) {
                return two;
            }
        }
    }

    const gtk = ();
    const uin = getCookie("uin").substring(5);
    const xhr = new XMLHttpRequest();
    const qzonetoken = window.shine0callback;
    var url = '/friend/mfriend_list?qzonetoken=' + qzonetoken + '&g_tk=' + gtk + '&res_uin=' + uin + '&res_type=normal&format=json&count_per_page=10&page_index=0&page_type=0&mayknowuin=&qqmailstat=';
     = function () {
        if ( == 4 && == 200) {
            const json = ()
            const allGroup = ;
            const allFriend = ;
            var consoleContext = "";
            for (var groupid of allGroup) {
                consoleContext += groupid["gpname"] + ":\n";
                for (const friendid of allFriend) {
                    if (groupid["gpid"] === friendid["groupid"]) {
                        consoleContext += " " + friendid["remark"] + "(" + friendid["uin"] + ")" + "\n";
                    }
                }
            }
            (consoleContext);
        }
    }
    ('GET', url)
     = true;
    ()

The information obtained is the friend's name + (account number)

Here's my improved version

The information obtained is the account number

// Get the value of a cookie with the specified name
function getCookie(aim) {
    // Remove spaces from the cookie string.
    const allText = (/\s*/g, ''); // Split the cookie string into an array by semicolon.
    // Split the cookie string into an array by semicolon.
    const oneText = (";"); // split the cookie string into arrays by semicolons

    // Iterate over each cookie
    for (var two of oneText) {
        // Split the cookies into key-value pairs by equal sign
        const three = ("=");
        // Check if the current cookie name matches the target name
        if (aim === three[0]) {
            return two; // return the matching cookie
        }
    }
}

// Get the user's GTK (the token used for authentication)
const gtk = ();
// Get the user's uin from the cookie with the prefix removed
const uin = getCookie("uin").substring(5);

// Create an XMLHttpRequest object to send an HTTP request
const xhr = new XMLHttpRequest(); // Create an XMLHttpRequest object to send HTTP requests.
// Get the qzonetoken
const qzonetoken = window.shine0callback;

// Construct the request URL
var url = '/friend/mfriend_list?qzonetoken=' + qzonetoken + '&g_tk=' + gtk + '&res_uin=' + uin + '&res_type=normal&format=json& amp;count_per_page=10&page_index=0&page_type=0&mayknowuin=&qqmailstat=';

// Set up a callback function for request status changes
 = function () {
    // When the request is complete and the response status is 200 (successful)
    if ( == 4 && == 200) {
        // Parsing the response text in JSON format
        const json = ();
        // Get all groups
        const allGroup = ;
        // Get a list of all friends.
        const allFriend = ;

        // Iterate over each group
        for (var groupid of allGroup) {
            // Iterate over each friend
            for (const friendid of allFriend) {
                // Check if the groupid of the friend matches the current groupid
                if (groupid["gpid"] === friendid["groupid"]) {
                    // If it matches, print the friend's uin (account number), on a separate line for each account number
                    (friendid["uin"]);
                }
            }
        }
    }
}

// Initialize the GET request
('GET', url); // Allow credentials (such as cookies) to be carried.
// Allow carrying credentials (e.g. cookies)
 = true; // Send the request.
// Send the request
();

Usage

Computer EDGE or Chrome

Open Qzone login then switch to emulation mode

Then in change the address to:/mqzone/index

Finally, put the code in the console and enter and you're done!

posted @ 2024-09-22 19:10  Little kBlog Read (0) Comments (0compiler  favorite  report (malefactors to the police)
The Power of Membership, Brightening Hope in the Garden
refresh pageBack to top

bulletin

Copyright © 2024 kBlog
Powered by .NET 8.0 on Kubernetes
'). // Side Hover Button $("#home").append( '
    ' + '
  • ' + // '
  • ' + '
  • ' + "
" ); }; function setProfile() { let avatar = "/avatar/2368840/", homepage = $('#profile_block a').eq(0).attr('href'), name = $('#profile_block a').eq(0).text(), desc = $('#blogTitle h2').html(), join = $('#profile_block a').eq(1).attr('title'), age = $('#profile_block a').eq(1).text(), fans_link = $('#profile_block a').eq(2).attr('href'), fans = $('#profile_block a').eq(2).text(), follow_link = $('#profile_block a').eq(3).attr('href'), follow = $('#profile_block a').eq(3).text(), post = $('#stats_post_count').text().replace(/[^0-9]/ig, ""), article = $('#stats_article_count').text().replace(/[^0-9]/ig, ""), comment = $('#stats-comment_count').text().replace(/[^0-9]/ig, ""), view_text = $('#stats-total-view-count span').text(), view_num = $('#stats-total-view-count span').attr('title').replace(/[^0-9]/ig, "") let profile = `
${name} ${age}
${desc}
  • ${follow}
  • ${fans}
    • ${post}
    • ${article}
    • ${comment}
    • ${view_text}
`; $('#blog-news').append(profile); $('#follow-btn').append($('#p_b_follow')); }; function dggit() { if ($("#topics").length > 0) { // setZan(); $('#digg_tips').bind("DOMNodeInserted", function () { //($('#digg_tips').text()) $('#digg_tips').hide(); if ($('#digg_tips').text() == "Support Success" || $('#digg_tips').text() == "取消Support Success") { ele.$message({ showClose: true, message: $('#digg_tips').text(), duration: 1000, type: "success", }); } if ($('#digg_tips').text() == "You have already supported" || $('#digg_tips').text() == "Can't recommend your own content" || $('#digg_tips').text() == "Can't argue against your own content") { ele.$message({ showClose: true, message: $('#digg_tips').text(), duration: 1000, type: "warning", }); } }) } } /* Magic Notes */ magicMarkdown = function () { // increase html coding $("-html").each(function () { if ($(this).text().split("\n")[0] == "") { $("#cnblogs_post_body").append($(this).text()); $(this).parent().remove(); } }); // increase js coding $("-html").each(function () { if ($(this).text().split("\n")[0] == "") { $("head").append($(this).text()); $(this).parent().remove(); } }); // Running Scripts $("-js").each(function () { if ($(this).text().split("\n")[0] == "// run") { ($(this).text()); $(this).parent().remove(); } }); }; function folderCollection() { let collection = $('.current-collection'); if ( > 0) { ('collapsed'); } } // bibliography function ref() { $(".footnote-ref a").each(function () { $(this).attr("title", $($(this).attr("href")).text().replace(/︎/g, '')); }); } // Figure annotation text function imgCaption() { $('.cnblogs-markdown p img').each(function () { if (typeof $(this).attr("alt") != "undefined") { if ($(this).attr("alt") != "") { $(this) .parent() .after( '
' + $(this).attr("alt") + "
" ); } } }) } /* ButtonClick event */ btnClick = function () { // Sidebar toggler $("#sidebar-toggler,.mask").click(function () { sidebarToggle(); }); // Hide the catalog on mobile by clicking $(".nav a").click(function () { var w = ; if (w 0) { $(".forFlow").before('
'); $(".post-header").append($(".postTitle")); $(".post-header").append($(".postDesc")); $(".post-header").css( "background", "url(" + $("#cnblogs_post_description .desc_img").attr("src") + ")" ); } }; /* Accompanying Writings Categorized Background Image */ entryPostTitle = function () { if ($(".entrylistDescription .desc_img").length > 0) { $("#mainContent").prepend('
'); $(".post-header").append($(".entrylistTitle")); $(".post-header").append($(".entrylistDescription")); $(".post-header").css( "background", "url(" + $(".entrylistDescription .desc_img").attr("src") + ")" ); } }; /* Switching Topics */ changeTheme = function () { if ($.cookie("theme") == "light") { $.cookie("theme", "dark", { expires: 30, path: "/", domain: "", }); ("theme", "dark"); } else { $.cookie("theme", "light", { expires: 30, path: "/", domain: "", }); ("theme", "dark"); } }; /* Side Switch */ sidebarToggle = function () { $("body").toggleClass("main-widthout-sidebar"); }; /* Side display */ showSide = function () { $("#sideBar").removeClass("content-active"); $("#sideBar").addClass("side-active"); $("#sideBar").scrollTop(0); }; /* Catalog Display */ showContent = function () { $("#sideBar").removeClass("side-active"); $("#sideBar").addClass("content-active"); contentScroll(); }; /* Smooth Scroll Control */ myscroll = function () { $(".float-btn a[href*=\\#]").click(function () { if ( (/^\//, "") == (/^\//, "") && == ) { var $target = $(); $target = ($ && $target) || $("[name=" + (1) + "]"); if ($) { var targetOffset = $().top; // $("html,body").animate({ scrollTop: targetOffset - 0, }, 500 ); return false; } = "#" + ('id'); } }); }; // Scroll Listener Events scrollListen = function () { $(window).scroll(function () { var scrolls = $(this).scrollTop(); if (scrolls >= windowTop) { //(coll.) fail (a student)scrolls>windowTophour,Indicates that the page is scrolling down $(".float-btn").addClass("float-btn-hide"); // if ($("#topics").length > 0 && scrolls > $(".postTitle").offset().top) { // $("#header").addClass("header-hidde"); //} windowTop = scrolls; } else { $(".float-btn").removeClass("float-btn-hide"); // $("#header").removeClass("header-hidde"); windowTop = scrolls; } }); }; postBasicSetting = function () { // Code Highlighting // $("pre code").each(function(i, block) { // (block); // }); // // Table scrolling // $("table").each(function() { // $(this).css("cssText", "width:100%!important;display:table;"); // $(this).wrapAll('
'); // $(".tablebox").css("overflow", "auto"); // }); // Open link in new window $('#cnblogs_post_body a[href^="http"]').each(function () { $(this).attr("target", "_blank"); }); // Side Hover Comment Button $(".btn-main").before( '' + '
  • ' ); // Scroll down to show the blog title /* $("#header").append( '
    ' ); $(".post-title").text($(".postTitle span").text()); */ // Image Viewer // fancyBox($(".cnblogs-markdown img")); // Code Copying //codeCopy($("pre"), "post"); }; // Image Viewer fancyBox = function (Img) { // $(".cnblogs-markdown img") (function () { var element = ("a"); $(element).attr("data-fancybox", "gallery"); $(element).attr("href", $(this).attr("src")); $(element).attr("data-caption", $(this).attr("alt")); $(this).wrap(element); if (typeof $(this).attr("alt") != "undefined") { if ($(this).attr("alt") != "") { $(this) .parent() .after( '
    ' + $(this).attr("alt") + "
    " ); } } }); }. /* Code Copy */ codeCopy = function (codeElement, prefix) { // Code copy button for (i = 0; i
    '); $(".copyItem").css("position", "relative"); if ((i).children("code").length > 0) { var codeType = codeElement .eq(i) // .children("code") .attr("class") // .split(" ")[0] .split("-")[1]; if (codeType == null) { codeType = ""; } else { codeType = (); } codeElement .eq(i) .before('
    ' + codeType + "
    "); } codeElement .eq(i) .before( '
    ' ); (i).attr("id", prefix + "_copy_target_" + i); } ("code").each(function () { var lines = $(this).text().split("\n").length - 1; var $numbering = $("
      ").addClass("pre-numbering"); $(this).addClass("has-numbering").parent().append($numbering); for (i = 1; i ").attr("data-number", i)); } }); }; /* Code Copying Hints */ copyCodeTip = function () { var clipboard = new ClipboardJS(".clipboard-button"); ("success", function (e) { ele.$message({ showClose: true, message: "Code copied successfully!", duration: 1000, type: "success", }); (); }); ("error", function (e) { ele.$message({ showClose: true, message: "Code Copy Failure!", duration: 1000, type: "error", }); (); }); }; /* owo Emoji plugin */ /* owoEmoji = function() { $(".commentbox_footer").prepend( '
      ' ); // Emoji button pressed load_face = function(b) { var c = new OwO({ logo: '', container: ("OwO")[0], target: ("tbCommentBody"), api: "/gh/gshang2018/home/", position: "up", width: "100%", maxHeight: "250px", }); ("OwO-open"); = null; }; };*/ /* Side catalog scrolling activation */ contentActiveListen = function () { //Enable scrolling listener, Listens to all messages in the.navunder theli // var top_offset = 60; // $("body").scrollspy({ // offset: top_offset, // bias voltage80,Preventing shading // }); $(window).scroll(function () { if ($('#sideBar').hasClass('content-active')) { contentScroll(); } }); }; contentScroll = function () { var now = $("#sidebar_scroller").find(".active"); var basicHeight = (); var prevNum = ().length + 1; var top_distance = prevNum * basicHeight - 60; $("#sideBar").scrollTop(top_distance); } msgDot = function () { $(document).ajaxComplete(function (event, xhr, option) { if ($('#msg_count').text() != "") { $("#blog_nav_contact").addClass("has_msg"); } }) } /* Side catalog */ setSideContent = function () { var $ph = $("#cnblogs_post_body :header:eq(0)"); if ($ > 0) { //Set the hierarchy to1 $("offset", "1"); //Adding content to the navigation catalog $("#sideBar").prepend( '' ); $("#sideBar").prepend( '
      sidebarleading principles
      ' ); $("#sideBarMain").hide(); showContent(); // Iterate through each h-tag in the post $("#cnblogs_post_body :header").each(function (i) { var $h = $(this); // Set the id of the h-tag, numbered from 0. // $(''); $("class", "title-parent"); // Lesser level than the previous h tag, plus 1 for the number of levels if ($h[0].tagName > $ph[0].tagName) { $("offset", parseInt($("offset")) + 1); } // greater than the last h tag level, level minus 1 else if ($h[0].tagName' + $() + "" ); // Finally set yourself to the previous h tag $ph = $h; }); contentActiveListen(); // side catalog scroll activation } }; setAvatar = function () { // Avatar $.each($(".feedbackItem"), function (index, ele) { var self = $(ele); var blog_comment = (".blog_comment_body", function (index, ele) { var obj = (".blog_comment_body"); var id = ("id").split("_")[2]; var blog = ('a[id").split("_")[2]) var blog = ('a[id^="a_comment_author"]'); var blogUrl = ("href"); var imgSrc = ("href") var imgSrc = $("#comment_" + id + "_avatar").html() || "/avatar/simple_avatar.gif"; ( '' ); $(".feedbackListSubtitle").addClass("feedbackListSubtitle_right"); $(".feedbackCon").addClass("feedbackCon_right"); }); } /* comment section */ setCommet = function () { $(document).ajaxComplete(function (event, xhr, option) { //Comment Avatar if (("GetComments") > -1) { setTimeout(function () { setAvatar(); }, 300); } }); };