npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wechaty-puppet-puppeteer

v0.24.6

Published

Puppet Puppeteer for Wechaty

Downloads

97

Readme

WECHATY-PUPPET-PUPPETEER

Powered by Wechaty NPM Version npm (tag) TypeScript NPM

Wechaty Puppet Puppeteer

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

Wechaty Puppet for Puppeteer

KNOWN LIMITATIONS

  1. WeChat Account that registered after 2017 mignt not be able to login Web Wechat, so it can not use PuppetPuppeteer 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-puppeteer

2. Windows

SET PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors npm install wechaty-puppet-puppeteer

Learn more from https://github.com/GoogleChrome/puppeteer/issues/1597#issuecomment-351945645

How to set puppeteer launchOptions?

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

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

// or
const bot = new Wechaty({
  name: 'mybot',
  puppet: 'wechaty-puppet-puppeteer',
  // ...
  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.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: https://github.com/Chatie/wechaty/issues/1152

AUTHOR

Huan LI <[email protected]>

COPYRIGHT & LICENSE

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