@forad/puppeteer-humanize

中文文档
1.1.8发布于 2021/08/08MITTypeScriptCommonJS近 30 天下载 2776

普普特人的人性化功能.

中文使用文档
文档目录4 节
  1. 安装
  2. 示例
  3. 已执行
  4. 路线图

傀儡-人道

puppeteer-humanize

Puppeteer 的人文化器功能

安装

$ npm install @forad/puppeteer-humanize

示例

下面是一个例子: typeInto 函数.


import { typeInto, TypeIntoConfig } from "@forad/puppeteer-humanize"
import { launch, Browser, Page, ElementHandle } from "puppeteer-extra"


;( async () => {
    const browser: Browser = await launch()
    const page: Page = await browser.newPage()

    await page.goto(`https://foo.bar`)

    const input: ElementHandle | undefined = await page.$(`input#my-input`)

    if (input) {
        // Text to enter into input.
        const text: string = `Zero Cool? Crashed fifteen hundred and seven computers in one day? Biggest crash in history, front page New York Times August 10th, 1988. I thought you was black, man. YO THIS IS ZERO COOL!`
        // Optional action configuration.
        // See `schemas/configs.ts` for full configuration shape.
        const config: TypeIntoConfig = {
            mistakes: {
                chance: 8,
                delay: {
                    min: 50,
                    max: 500
                }
            },
            delays: {
                space: {
                    chance: 70,
                    min: 10,
                    max: 50
                }
            }
        }
        // Deploy the action...
        await typeInto(input, text, config)
    }

    console.log(`Input complete!`)
} )()


已执行

  • typeInto(element, text, config)

路线图

  • GAN 鼠标移动动作
  • 改进打字行动
  • 提议的东西 解析器 或者说 讨论情况 (没有问题跟踪器)

版本与发布记录

@forad/puppeteer-humanize 共发布 10 个版本,首次发布于 2021/07/29;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.1.8latest2021/08/085 年前
1.1.72021/08/085 年前
1.1.62021/08/085 年前
1.1.52021/08/085 年前
1.1.42021/08/085 年前
1.1.32021/08/085 年前

关于 @forad/puppeteer-humanize 的常见问题

@forad/puppeteer-humanize 是什么?

普普特人的人性化功能.

如何安装 @forad/puppeteer-humanize?

在项目目录运行 npm install @forad/puppeteer-humanize,或使用 pnpm add / yarn add / bun add。

@forad/puppeteer-humanize 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@forad/puppeteer-humanize 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@forad/puppeteer-humanize 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@forad/puppeteer-humanize 可以商用吗?

@forad/puppeteer-humanize 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@forad/puppeteer-humanize 的下载量有多少?

根据 npm 官方下载统计,@forad/puppeteer-humanize 在 2026/10/16 – 2026/11/14 这 30 天内被下载 2,776 次,日均约 93 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@forad/puppeteer-humanize 还在维护吗?

最新版本 1.1.8 发布于 2021/08/08(5 年前);至今共发布 10 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/07/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。