项目作者: aowlsprit

项目描述 :
Minimal 4chan CLI and API. Downloading images, listing catalogs, etc...
高级语言: JavaScript
项目地址: git://github.com/aowlsprit/4ch.git
创建时间: 2019-01-09T13:52:01Z
项目社区:https://github.com/aowlsprit/4ch

开源协议:

下载


4ch

js-standard-style

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

Installation

  1. yarn global add 4ch

Or if you prefer npm

  1. npm install -g 4ch

Commands (CLI)

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

Usage (API)

  1. const {
  2. downloadThreadImages,
  3. getBoardCatalog,
  4. getThread } = require('4ch')
  5. const threads = await getBoardCatalog('g')
  6. const posts = await getThread('g', '123456789')
  7. const images = await downloadThreadImages('g', '123456789')

Contact

@aowlsprit