QQ玩一玩获取PUIN

版权声明:本文为博主原创文章,欢迎转载,转载标明出处(http://blog.csdn.net/zyw_java)。微信公众号:javenlife https://blog.csdn.net/zyw_java/article/details/85276651

官方参考链接

https://hudong.qq.com/docs/engine/userInfo/pubAccount.html

前提概要

文档中详细描述了查询是否关注公众号以及进入公众号主页 这两个接口。但都需要PUIN,如何获取PUIN呢?官方文档描述如下。

获取PUIN
1、登录mp.qq.com进入服务号
2、进入公众号设置页,点击二维码下载更多尺寸
3、选择任意下载链接复制下载地址
4、复制到地址栏查看PUIN

操作到第4步时你获取到的内容如下

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAAEuCAYAAAAwQP9DAAAAAXNSR0IArs4c6QAAFhhJREFUeAHtndFu5DoOBSeL/P8vz0YPBhoNFWOqaZmeWwssOkNT5xyVAsKIkNyvP3/+/P35/yP+9/fvPVG/vr6Qz12ZMNDPgyhvtO7TZyss7sr66V7PrCce0Z5pzRm/1x7yIH3qf9Xs9PX/OoUxiwQkIIEzBBxcZyjZIwEJtCLg4Gp1HIaRgATOEHBwnaFkjwQk0IqAg6vVcRhGAhI4Q+Cbmuj2gfqr6pW3G6RFe6P+qr2t6FAm2sPwiJ7NMqx4ZHRmvUeNslKmY93ZT9If68mD1lD/2SxHH+lHmY61d3xGea/ME/H2jetK8mpLQAKXEHBwXYJVUQlI4EoCDq4r6aotAQlcQsDBdQlWRSUggSsJOLiupKu2BCRwCQG8VSS36Cf9tGZWv+umYmSp2sNsX0ct60E8qH74XPlJe1jJRGsqPapYUCbSr9wbaZF3NivprNSrvLN7Hll941o5MddIQAK3EnBw3YpfcwlIYIWAg2uFmmskIIFbCTi4bsWvuQQksELAwbVCzTUSkMCtBNK3irembWhONyt0U0L9d24tm5X2QDpjbytr7mJC+6A9UJ10duzrTu8d+/ONawdlPSQggVICDq5SnIpJQAI7CDi4dlDWQwISKCXg4CrFqZgEJLCDgINrB2U9JCCBUgL/9K3ijpsVulGiU8pmIv1Ih9ZUZSKdr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SKAtAQdX26MxmAQkQAQcXETGugQk0JaAg6vt0RhMAhIgAg4uImNdAhJoS+CfuFWMbh8qyNOtR6RNmVa0Zj4rOpRppl9dI2/aB/VTrhWdKg/KlNUfOitrZv5VOjPt6tpKVt+4qk9BPQlI4HICDq7LEWsgAQlUE3BwVRNVTwISuJyAg+tyxBpIQALVBBxc1UTVk4AELieQvlVcuQG4fBdgQDdN0L50o5P1qPKuPIcde6jyyOpE/VmG1E8eVKfvgZU6ZVrRojU79kHeVPeNi8hYl4AE2hJwcLU9GoNJQAJEwMFFZKxLQAJtCTi42h6NwSQgASLg4CIy1iUggbYE8Fax400CUaSs2RsX0iHfUc96kFbWu8qX8vwX6lXMs2eR9a08C/KO9kDPVrRmeyGdWe9R843rIOGnBCTwGAIOrscclUElIIGDgIPrIOGnBCTwGAIOrscclUElIIGDgIPrIOGnBCTwGAIOrscclUElIIGDwP8BkE9Qqj+0UZcAAAAASUVORK5CYII=

而不是官方截图中的地址,由于平台升级下载地址变更里面根本就没有PUIN 信息。

终极解决方案

在手Q中搜索公众号名称 点击搜索到的公众号此时会跳转至公众号主页,再点击右上方的... 选择分享并分享给微信好友,然后去微信中点击分享后的消息,再点击微信右上方的... 选择复制链接

公众号主页 分享后复制链接 获取公众号PUIN
公众号主页 复制分享的链接 获取公众号PUIN

由此可以看到此公众号的PUIN2896237320

补充

轻游戏交流群中有小伙伴(@重庆-小砖头)反馈说上面公众号主页 与我的不一样,分享到微信获取到后复制链接中也没有PUIN。下面介绍一下这位小伙伴的解决方案

公众号主页 分享给QQ在window电脑上右键获取链接
公众号主页 分享给QQ在Window电脑上右键

在PC上右键复制出来的链接如下

https://post.mp.qq.com/tmpl/default/client/article/html/jump.html?action=accountCard&puin=2451398720

此公众号的PUIN2451398720

有个很意外的发现 此种类型公众号的PUIN就是登录QQ公众平台的QQ号

到这里就介绍完了,个人能力有限如有错误欢迎指正,如有遗漏欢迎补充。如有疑问欢迎留言一起交流讨论。

博客左上角有轻游戏的交流群

【玩一玩】验证码

07-23

建模一轮培训结束了暑假终于到来,今天来玩玩C#写验证码。[url=http://b225.photo.store.qq.com/psb?/V11GVizq1Caq4x/LtMkj.O9VS3.caaW3aHolTyy0kslvTI206g0wvqejrY!/b/Yd1yIoZPRgAAYgoSKoanRgAA][/url]rn总体上实现了数字和字母的验证 但是发现数字和字母组成的验证码不能保持居中 求高手来解答 rn代码如下:rn[code=C#]rnusing System;rnusing System.Collections.Generic;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Linq;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.Drawing.Drawing2D;rnrnnamespace 验证码rnrn public partial class Form1 : Formrn rn public Form1()rn rn InitializeComponent();rn rn public string txt = "";rn private void Form1_Load(object sender, EventArgs e)rn rn CreateImage();rn rn private void CreateImage()rn rn string[] r = new String[62] "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",rn "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"; rn Random x = new Random();rn string str1 = r[x.Next(0, 62)], str2 =r[x.Next(0, 62)], str3 =r[x.Next(0, 62)], str4 =r[x.Next(0, 62)];rn txt = str1 + str2 + str3 + str4;rn if (txt == null || txt == String.Empty)rn rn return;rn rn Bitmap image = new Bitmap((int)Math.Ceiling((txt.Length*15.0)), 20);rn Graphics g = Graphics.FromImage(image);rn tryrn rn //生成随机生成器rn Random random = new Random();rn //清空图片背景色以白色填充rn g.Clear(Color.White);rn //画图片的背景噪音线rn for (int i = 0; i < 3; i++)rn rn Point tem_Point_1 = new Point(random.Next(image.Width), random.Next(image.Height));rn Point tem_Point_2 = new Point(random.Next(image.Width), random.Next(image.Height));rn g.DrawLine(new Pen(Color.Black), tem_Point_1, tem_Point_2);rn rn Font font = new Font("Arial", 12, (FontStyle.Bold));rn LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Pink , Color.Red, 1.2f, true);rn g.DrawString(txt, font, brush, 2, 2);rn //画图片的前景噪音点rn for (int i = 0; i < 100; i++)rn rn Point tem_point = new Point(random.Next(image.Width), random.Next(image.Height));rn image.SetPixel(tem_point.X, tem_point.Y, Color.FromArgb(random.Next()));rn rn //画图片的边框线rn g.DrawRectangle(new Pen(Color.Silver), 0, 0, image.Width - 1, image.Height - 1);rn pictureBox1.Image = image;rn rn catch (Exception e)rn rn MessageBox.Show(e.Message);rn rn rnrn private void button2_Click(object sender, EventArgs e)rn rn CreateImage();rn rnrn private void button1_Click(object sender, EventArgs e)rn rn if (textBox1.Text.Trim() =="")rn rn return;rn rn elsern rn if (textBox1.Text.Trim().ToLower() == txt.ToLower())rn rn MessageBox.Show("提示:输入正确", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn rn elsern rn MessageBox.Show("提示:验证码输入错误,请重新输入", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn rn rn rnrn rnrn[/code] 论坛

没有更多推荐了,返回首页