@web-printer/zhihu
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@web-printer/zhihu

Warning

need login before printing

知乎 zhihu.cn

Installation

pnpm i @web-printer/zhihu
import { Printer } from "@web-printer/core"
import zhihu from "@web-printer/zhihu"

new Printer()
  .use(
    zhihu({
      url: "https://www.zhihu.com/collection/19561986"
    })
  )
  .print("值得回头看几遍")

Options

{
  /**
   * Url of an article list page
   * @example
   * - "https://zhuanlan.zhihu.com/mactalk"
   * - "https://www.zhihu.com/collection/19561986"
   * - "https://www.zhihu.com/topic/20069728/top-answers"
   */
  url: string
  /**
   * When artical list page have much articals, you can set maxPages to limit, especially endless loading.
   */
  maxPages?: number
  /**
   * When artical list page have paginations, you can set threads to speed up fetch articals url.
   * @default 1
   */
  threads?: number
  /**
   * Interval of each scroll
   * @default 500
   * @unit ms
   */
  interval?: number
  /**
   * waiting img and latex lazy load
   * @default 500
   * @unit ms
   */
  imgWaiting?: number
}

License

MIT ©

Readme

Keywords

none

Package Sidebar

Install

npm i @web-printer/zhihu

Weekly Downloads

2

Version

0.4.0

License

MIT

Unpacked Size

11.2 kB

Total Files

6

Last publish

Collaborators

  • ourongxing