4ch 中文文档教程

发布于 6年前 浏览 33 项目主页 更新于 3年前

4ch

js -standard-style

用于从 4chan 中获取所需内容的最小 Node.js API 和 CLI。

Installation

yarn global add 4ch

或者如果你更喜欢 npm

npm install -g 4ch

Commands (CLI)

4ch [ls|dl|cat] [options]

DESCRIPTION
  ls -- List all active threads of a given board.
    options: [board]
    example: 4ch list g
  dl -- Download all image/gif/web files of a given thread in a board. Images are downloaded to the `process.cwd()/4ch-out/` folder.
    options: [board, thread]
    example: 4ch dl g 123456789
  cat -- Print all posts of a given thread in a board.
    options: [board, thread]
    example: 4ch cat g 123456789

Usage (API)

const {
  downloadThreadImages,
  getBoardCatalog,
  getThread } = require('4ch')

const threads = await getBoardCatalog('g')
const posts = await getThread('g', '123456789')
const images = await downloadThreadImages('g', '123456789')

Contact

@aowlsprit

4ch

js-standard-style

Minimal Node.js API and CLI for getting what you want out of 4chan.

Installation

yarn global add 4ch

Or if you prefer npm

npm install -g 4ch

Commands (CLI)

4ch [ls|dl|cat] [options]

DESCRIPTION
  ls -- List all active threads of a given board.
    options: [board]
    example: 4ch list g
  dl -- Download all image/gif/web files of a given thread in a board. Images are downloaded to the `process.cwd()/4ch-out/` folder.
    options: [board, thread]
    example: 4ch dl g 123456789
  cat -- Print all posts of a given thread in a board.
    options: [board, thread]
    example: 4ch cat g 123456789

Usage (API)

const {
  downloadThreadImages,
  getBoardCatalog,
  getThread } = require('4ch')

const threads = await getBoardCatalog('g')
const posts = await getThread('g', '123456789')
const images = await downloadThreadImages('g', '123456789')

Contact

@aowlsprit

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文