0.4.0 • Published 9 months ago

@web-printer/zhihu v0.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@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 ©

0.4.0

9 months ago

0.3.0

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago