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

@iflyrpa/playwright

v1.2.68

Published

iflyrpa 封装的一组特定场景的自动化脚本,支持的场景如下:

Readme

@iflyrpa/playwright

iflyrpa 封装的一组特定场景的自动化脚本,支持的场景如下:

| 平台 | 脚本 | 说明 | 支持的方式 | | ----------------------------- | ------------------------- | -------------------------------------------------- | -------------- | | 头条 | toutiaoPublish | 发布/保存草稿 | Mock Api / RPA | | 头条 | getToutiaoConfig | 获取头条发布配置的话题信息、位置信息和原创首发信息 | Mock Api | | 头条 | searchToutiaoTopicList | 搜索头条话题 | Mock Api | | 微头条 | weitoutiaoPublish | 发布 | Mock Api / RPA | | 百家号 | getBaijiahaoActivity | 查询百家号活动投稿 | Mock Api | | 百家号 | getBaijiahaoConfig | 获取百家号发布的设置信息 | Mock Api / RPA | | 百家号 | baijiahaoPublish | 发布/保存草稿 | Mock Api / RPA | | 微信公众号(小绿书-图文模式) | weixinmpPublish | 发布 | Mock Api / RPA | | 微信公众号 | weixinPublish | 发布 | Mock Api | | 小红书 | xiaohongshuPublish | 发布 | Mock Api / RPA | | 小红书 | searchXiaohongshuTopicList | 搜索小红书话题 | Mock Api | | 小红书 | searchXiaohongshuLocation | 搜索小红书地址 | Mock Api |

安装

# npm
npm i @iflyrpa/playwright

# yarn
yarn add @iflyrpa/playwright

# pnpm
pnpm install @iflyrpa/playwright

使用方法

import { RpaTask } from "@iflyrpa/playwright";

//  1. 创建缓存目录
const cachePath = join(__dirname, "../main/cache");

// 2. 初始化
const automateTask = new RpaTask({
  cachePath, // 缓存目录
  debug: true, // debug 模式下可视化展示所有操作
  forceUpdate: false, // 是否使用远程最新版本
  user: { id: "xx", email: "[email protected]" }, // 用户信息
  enverionment: "development", // 环境变量(主要用于在日志中区分环境)
});

// 3. 执行脚本,支持的脚本如上
automateTask.actions.xiaohongshuPublish(xiaohonshuPublishParams)

// 4. 应用关闭前,清除副作用
app.on("before-quit", (event) => {
 if (!automateTask.isClosed) {
  // 阻止应用立即退出
  event.preventDefault();

  automateTask.close().finally(() => {
   console.log("close app");
   app.quit();
  });
 }
});

注意事项

1. 缓存目录包含以下文件:

  • packages:运行时依赖和脚本缓存目录
  • tmp:运行时缓存目录
  • rpa.log:运行日志文件

2. 如何获取脚本入参类型:

import type { ActionMethodParams } from "@iflyrpa/playwright";

export const xiaohonshuPublishParams: ActionMethodParams['xiaohongshuPublish'] = {}

automateTask.actions.xiaohongshuPublish(xiaohonshuPublishParams)