Giter VIP home page Giter VIP logo

wechaty-puppet-wechat's Introduction

WECHATY-PUPPET-WECHAT

Powered by Wechaty NPM Version npm (tag) TypeScript NPM

Wechaty Puppet Puppeteer

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

Wechaty Puppet for WeChat

KNOWN LIMITATIONS

  1. 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://npm.taobao.org/mirrors npm install wechaty-puppet-wechat

2. Windows

SET PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/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_PUPPETEER_STEALTHLESS environment variable to 1. eg. WECHATY_PUPPET_PUPPETEER_STEALTHLESS=1 ts-node your-bot.ts

puppetOptions

Option value default value description
endpoint string - puppeteerlaunchoptions.executablePath
head boolean false puppeteerlaunchoptions.headless
launchOptions object - same to puppeteerlaunchoptions
stealthless boolean false disabled puppeteer-extra-plugin-stealth or not

HISTORY

master

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: libX11.so.6: 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:

sudo apt-get install libxss1

See: wechaty/wechaty#1152

AUTHOR

Huan LI <[email protected]>

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

COPYRIGHT & LICENSE

  • Code & Docs © 2016-2019 Huan LI <[email protected]>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

wechaty-puppet-wechat's People

Contributors

greenkeeper[bot] avatar hoo-ge avatar huan avatar leochen-g avatar seanxlliu avatar solarhell avatar sososoyoung avatar su-chang avatar wxul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.