All Projects → wechaty → puppet-wechat

wechaty / puppet-wechat

Licence: Apache-2.0 license
Wechaty Puppet Provider for WeChat

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to puppet-wechat

grpc
gRPC Service & Protocol Buffers for Wechaty Puppet
Stars: ✭ 20 (-92.22%)
Mutual labels:  wechaty
wechaty-Robot
基于wechaty-puppet-padplus的微信机器人助手
Stars: ✭ 87 (-66.15%)
Mutual labels:  wechaty
puppet-mock
Puppet Mocker for Wechaty (& A Puppet Template Starter)
Stars: ✭ 33 (-87.16%)
Mutual labels:  wechaty
puppet-supports
Wechaty Puppet Services (WPS)
Stars: ✭ 18 (-93%)
Mutual labels:  wechaty-puppet
python-wechaty-getting-started
Python Wechaty Starter Project Template that Works Out-of-the-Box
Stars: ✭ 140 (-45.53%)
Mutual labels:  wechaty
Wechaty
Conversational RPA SDK for Chatbot Makers
Stars: ✭ 11,647 (+4431.91%)
Mutual labels:  wechaty
java-wechaty-getting-started
Java Wechaty Starter Project Template that Works Out-of-the-Box
Stars: ✭ 30 (-88.33%)
Mutual labels:  wechaty
wechaty-puppet-simplepad
Another implementation of Wechaty-Puppet
Stars: ✭ 21 (-91.83%)
Mutual labels:  wechaty
php-wechaty
PHP Wechaty is a Conversational SDK for Chatbot Makers Written in PHP
Stars: ✭ 35 (-86.38%)
Mutual labels:  wechaty
osschat
Apache Open Source Software Chat BOT
Stars: ✭ 115 (-55.25%)
Mutual labels:  wechaty
dotnet-wechaty
.NET Wechaty is a Conversational SDK for Chatbot Makers Written in C#
Stars: ✭ 50 (-80.54%)
Mutual labels:  wechaty
getting-started
A Starter Project Template for Wechaty works out-of-the-box
Stars: ✭ 512 (+99.22%)
Mutual labels:  wechaty
summer
Summer of Wechaty (SoW) is a program for connecting students with the Wechaty community for coding & tech writing.
Stars: ✭ 30 (-88.33%)
Mutual labels:  wechaty
push-bot
Pushbot[推送精灵] wechat message bot/基于wechaty的微信推送机器人
Stars: ✭ 310 (+20.62%)
Mutual labels:  wechaty

WECHATY-PUPPET-WECHAT

Powered by Wechaty NPM Version npm (tag) TypeScript NPM ES Modules

Wechaty Puppet Puppeteer

Picture Credit: https://www.forsbergplustwo.com

Wechaty Puppet for WeChat

KNOWN LIMITATIONS

  1. Solved by UOS. WeChat Account that registered after 2017 mignt not be able to login Web Wechat, so it can not use PuppetWeChat with Wechaty. Please make sure your WeChat Account can be able to login by visiting https://wx.qq.com
  2. Web API can not create room and invite members to room since 2018.
  3. Can not Receive/Send message from Work Wechat.

If you want to break the above limitations, please consider to use a Wechaty Puppet other than using Web API, like wechaty-puppet-padchat.

Learn more about the Puppet at Wechaty wiki: Puppet

Note for Developers in China

Cause storage.googleapis.com is blocked in mainland china, you'd better config by following guide.

1. Linux & Mac

PUPPETEER_DOWNLOAD_HOST=https://registry.npmmirror.com/mirrors npm install wechaty-puppet-wechat

2. Windows

SET PUPPETEER_DOWNLOAD_HOST=https://registry.npmmirror.com/mirrors npm install wechaty-puppet-wechat

Learn more from puppeteer/puppeteer#1597 (comment)

How to set puppeteer launchOptions?

An example of adding executablePath to puppeteer.launch():

const bot = new Wechaty({
  name: 'mybot',
  puppet: 'wechaty-puppet-wechat',
  // ...
  puppetOptions: {
    endpoint: '<executablePath>'
  }
});

// or
const bot = new Wechaty({
  name: 'mybot',
  puppet: 'wechaty-puppet-wechat',
  // ...
  puppetOptions: {
    launchOptions: {
      executablePath: '<executablePath>',
      // ... others launchOptions, see: https://github.com/GoogleChrome/puppeteer/blob/v1.18.1/docs/api.md#puppeteerlaunchoptions
    }
  }
});

We use stealth to make puppeteer more like a normal browser, if you want to disabled it, just set the WECHATY_PUPPET_WECHAT_PUPPETEER_STEALTHLESS environment variable to 1. eg. WECHATY_PUPPET_WECHAT_PUPPETEER_STEALTHLESS=1 ts-node your-bot.ts

In rare cases, we could meet some problem and see Error: Could not find expected browser when we start PuppetWeChatBridge and try to run initBrowser(). A easy way to solve this problem is set WECHATY_PUPPET_WECHAT_ENDPOINT environment variable to <your executablePath>. eg. WECHATY_PUPPET_WECHAT_ENDPOINT=/usr/bin/chromium-browser ts-node your-bot.ts

puppetOptions

Option value default value description
token string - your own uos extspam value, see #127
endpoint string - puppeteerlaunchoptions.executablePath
head boolean false puppeteerlaunchoptions.headless
launchOptions object - same to puppeteerlaunchoptions
stealthless boolean false disabled puppeteer-extra-plugin-stealth or not
uos boolean false enable UOS patch or not

HISTORY

master v1.12 (Mar 11, 2022)

Release stable for the standard Web Protocol

v1.0 (Oct 30, 2021)

Release 1.0 of Wechaty Puppet for WeChat

  1. v0.30 (Sep, 2021): ESM support.

v0.28 (Apr 13, 2021)

重磅:绕过登录限制,wechaty免费版web协议重放荣光

  1. Support UOS with puppeteer #127
  2. 添加uos请求头支持 #129

v0.26 (Mar 4, 2021)

Rename NPM package name from wechaty-puppet-puppeteer to wechaty-puppet-wechat

v0.24 (Feb 20, 2021)

  1. Puppeteer from v5 to v7
  2. Upgrade other deps

v0.22 (Jun 18, 2020)

Release a version before upgrade.

v0.14 (Aug, 2018)

  1. First Stable Release
  2. Follow latest typings

v0.2 (May, 2018)

  1. Promote to solo package: wechaty-puppet-puppeteer

FAQ

1. chrome-linux/chrome: error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory

You need to be able to run chrome in your Linux environment. If you are using Ubuntu Linux:

  • error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
    • apt install libnss3
  • error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
    • apt install libgbm-dev
  • error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory
    • apt install libxshmfence-dev
  • error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
    • apt install libxss1

See: wechaty/wechaty#1152

AUTHOR

Huan LI Tencent TVP of Chatbot <[email protected]>

profile for zixia on Stack Exchange, a network of free, community-driven Q&A sites

COPYRIGHT & LICENSE

  • Code & Docs © 2016-now Huan LI <[email protected]>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].