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 🙏

© 2026 – Pkg Stats / Ryan Hefner

weiboer

v1.0.10

Published

一个用于自动发送微博的小插件

Readme

Description

一个用于自动发送微博的小插件

headless: false时效果图:

Install

npm i weiboer --save

Config

// config.json 微博账号设置
{
  "username": "185********",
  "password": "your.password",
}
// .weiboer.js 全局puppeteer配置
const path = require('path');
const { PC_AGENTS } = require('./libs/userAgents');

module.exports = {
  // cookie缓存路径,默认会使用上次的cookie,如果有效则不使用账号密码登陆
  'cookies_cache_path': path.resolve(__dirname, '.cookies'), 
  // 浏览器UA
  'default_ua': PC_AGENTS.SAFRI_MAC,
  // puppeteer 登陆选项
  'launch_options': {
    'headless': false,
  },
  'viewport_options': {
    'width': 1366,
    'height': 768,
    'deviceScaleFactor': 1,
  }
}

Usage

const weiboer = require('weiboer');
const path = require('path');
const configFile = path.resolve(__dirname, './config.json'); // 微博账号配置,
// configFile 可以缺省,但要至少确保环境变量中设置了username, password
const weiboHelper = weiboer.init(configFile);
weiboHelper.publish('微博内容', ['./images/01.jps', './images/02.jps']);

Methods

publish

Parameters

  • text:string 微博内容
  • images:Array 微博配图列表,本地图片路径

Results detecting

  weiboHelper.publish('xx', ['./some_img.jpg'])
    .then(() => {
      // success
    })
    .catch(() => {
      // error
    });
  async function someFun() {
    try {
      await  weiboHelper.publish('xx', ['./some_img.jpg']);
    } catch (e) {
      // error handlers
    }
  }

注意⚠️

请勿段时间频繁触发使用账号密码登陆流程,实测发现登陆一定次数后会出现输入账号正确仍然提示账号密码错误的情况。