From 1293b1af33fdd8c2265bb44fba7579a82d6d8e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Sun, 4 Jun 2023 17:05:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7=20=E6=8E=A8=E6=96=87=E4=BF=A1=E6=81=AF=20F12?= =?UTF-8?q?=20=E6=8F=90=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/微信公众号 推文信息 F12 提取.js | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 tools/微信公众号 推文信息 F12 提取.js diff --git a/tools/微信公众号 推文信息 F12 提取.js b/tools/微信公众号 推文信息 F12 提取.js new file mode 100644 index 0000000..e8aeef8 --- /dev/null +++ b/tools/微信公众号 推文信息 F12 提取.js @@ -0,0 +1,62 @@ +// 微信公众号 推文信息 F12 提取 +let a = { + + // 作者信息 + appuin: window.appuin, // "MzI0NzU1Mjk3NQ==" + biz: window.biz, // "MzI0NzU1Mjk3NQ==" + sn: window.sn, // "af570aa31c5634f769991fa19f6ca648" + source_appid: window.source_appid, // 公众号appid "wx7fc1f687612899fd" + user_name: window.user_name, // "gh_12ec9e62ced0" + author: window.author, // "大学生记者团" + nickname: window.nickname, // "武汉马拉松" + + // 文章信息 + appmsgid: window.appmsgid, // "2247505784" + create_time: create_time, // 1681811767 + ct: ct, // "1681811767" + + // 封面图 + msg_cdn_url: window.msg_cdn_url, // 1:1 图片 + cdn_url_1_1: window.cdn_url_1_1, // 1:1 图片 "https://mmbiz.qpic.cn/mmbiz_jpg/lOW8OhxyoMvvLKyJkpiaLO0r52s9S5sRcLHBrBpkdnQiconATNtX32aT7qZx0dcNKicazP0ACGmrc28cgAWYeRorQ/0?wx_fmt=jpeg" + cdn_url_235_1: window.cdn_url_235_1, // 2.35:1 图片 "https://mmbiz.qpic.cn/mmbiz_jpg/lOW8OhxyoMvvLKyJkpiaLO0r52s9S5sRcZ27ZxUxibUicxjtncg5xf4GpBBRY1NiaeyfkBRJ2AU5ToYsUH8icTcb2ew/0?wx_fmt=jpeg" + + // 文章链接 + msg_link: window.msg_link.replace(/&/g, "&"), + + // 文章标题 + msg_title: window.msg_title, + + ori_head_img_url: window.ori_head_img_url, // 公众号头像 http://wx.qlogo.cn/mmhead/Q3auHgzwzM6WjyiakY6Qe7rC10f7R2MNoEkt1Caer3wZYyIkAy4jZicw/132 + round_head_img: window.ori_head_img_url, // 公众号头像(圆) + + weEmoji: window.weEmoji, + + videoPageInfos: window.videoPageInfos, + voiceList: window.voiceList, +} + +// 微信公众号文章中提取出的有用函数 +var getQuery = function (name, url) { + //参数:变量名,url为空则表从当前页面的url中取 + var u = arguments[1] || window.location.search, + reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"), + r = u.substr(u.indexOf("\?") + 1).match(reg); + return r != null ? r[2] : ""; +}; + + +window.getQueryFromURL = function (url) { + url = url || 'http://qq.com/s?a=b#rd'; + // 做一层保护,保证URL是合法的 + var tmp = url.split('?') + , query = (tmp[1] || "").split('#')[0].split('&') + , params = {}; + for (var i = 0; i < query.length; i++) { + var arg = query[i].split('='); + params[arg[0]] = arg[1]; + } + if (params['pass_ticket']) { + params['pass_ticket'] = encodeURIComponent(params['pass_ticket'].html(false).html(false).replace(/\s/g, "+")); + } + return params; +};