This module is a parser for 2ch, the most famous BBS in Japan.
This module is a parser for 2ch which is most famous BBS in Japan.
npm install 2ch-parser
`Documentation
- Japanese
- EnglishUsage
The codes below try to fetch a list of threads and posts.
`javascript
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)
}
})
``javascript
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)
}
})
``