2ch-parser 中文文档教程
2ch-parser
该模块是日本最著名的 BBS 2ch 的解析器。
Support
本模块支持部分兼容2ch的BBS,不支持5ch.net。
Installation
使用 npm 安装。
npm install 2ch-parser
Documentation
Usage
下面的代码尝试获取线程和帖子的列表。
import { Board } from '2ch-parser'
var board = new Board("http://toro.2ch.sc/tech/")
board.fetchThreads((res) => {
if (res.statusCode == 200) {
console.log(board.threads)
}
})
import { Thread } from '2ch-parser'
var thread = new Thread("http://toro.2ch.sc/test/read.cgi/tech/123456789/")
thread.fetchAllPosts((res)=>{
if (res.statusCode == 200) {
console.log(thread.posts)
}
})
License
Author
2ch-parser
This module is a parser for 2ch which is most famous BBS in Japan.
Support
This module supports some BBS compatible with 2ch, but doesn't support 5ch.net.
Installation
Install with npm.
npm install 2ch-parser
Documentation
Usage
The codes below try to fetch a list of threads and posts.
import { Board } from '2ch-parser'
var board = new Board("http://toro.2ch.sc/tech/")
board.fetchThreads((res) => {
if (res.statusCode == 200) {
console.log(board.threads)
}
})
import { Thread } from '2ch-parser'
var thread = new Thread("http://toro.2ch.sc/test/read.cgi/tech/123456789/")
thread.fetchAllPosts((res)=>{
if (res.statusCode == 200) {
console.log(thread.posts)
}
})
License
Author
更多
你可能也喜欢
- @0x-jerry/vue-kit 中文文档教程
- @0x/migrations 中文文档教程
- @0xcert/scaffold 中文文档教程
- @20tab/react-leaflet-resetview 中文文档教程
- @2600hz/sds-react-native-theme 中文文档教程
- @2pi-network/js-sdk 中文文档教程
- @3846masa/bmp 中文文档教程
- @3test/wanchain-asset-ledger 中文文档教程
- @a8k/nunjucks-loader 中文文档教程
- @aavenel/ckeditor5-build-classic-source-editing 中文文档教程