前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >微信多开(免费版)_wechat国际版

微信多开(免费版)_wechat国际版

作者头像
全栈程序员站长
发布2022-09-20 19:02:49
发布2022-09-20 19:02:49
90600
代码可运行
举报
运行总次数:0
代码可运行

大家好,又见面了,我是你们的朋友全栈君。

惊喜!!!放在前面

在我发布文章这一天,下午打开wechaty博客的时候发现

重磅:绕过登录限制,wechaty免费版web协议重新荣光 这篇文章,可以完美实现无需token即可实现微信登录

效果及代码 你的微信会在桌面微信登录,完美绕过不可以web登录微信的痛点,也可以正常使用你的其他功能

代码语言:javascript
代码运行次数:0
复制
const { Wechaty } = require("wechaty");
const Qrterminal = require("qrcode-terminal");

const name = "wechat-puppet-wechat";
let bot = "";
bot = new Wechaty({
  name, // generate xxxx.memory-card.json and save login data for the next login
});

//  二维码生成
function onScan(qrcode, status) {
  Qrterminal.generate(qrcode); // 在console端显示二维码
  const qrcodeImageUrl = [
    "https://wechaty.js.org/qrcode/",
    encodeURIComponent(qrcode),
  ].join("");
  console.log(qrcodeImageUrl);
}

// 登录
async function onLogin(user) {
  console.log(`贴心小助理${user}登录了`);
  if (config.AUTOREPLY) {
    console.log(`已开启机器人自动聊天模式`);
  }
}

//登出
function onLogout(user) {
  console.log(`小助手${user} 已经登出`);
}

bot.on("scan", onScan);
bot.on("login", onLogin);
bot.on("logout", onLogout);
bot.on("message", function(message){
    console.log(message);
}) // 消息监听
bot
  .start()
  .then(() => console.log("开始登陆微信"))
  .catch((e) => console.error(e));

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/166951.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 惊喜!!!放在前面
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档