hakuneko
v0.4.21
Published
Scraper for manga websites
Downloads
67
Readme
Table of Content
General
HakuNeko provides parsers to access mangas from some selected websites.
Include the module:
// [optional] use a logtrine logger in case for debug output
const { FileLogger } = require('logtrine');
const { KissManga, MangaGo } = require('hakuneko');
var logger = new FileLogger('./hakuneko.log', ConsoleLogger.LEVEL.All);
var kissmanga = new KissManga(logger);
var mangago = new MangaGo(logger);
Basic data structure for manga(s):
{
"id": "/Manga/Mirai-Nikki",
"title": "Mirai Nikki"
}
Basic data structure for chapter(s):
{
"id": "/Manga/Mirai-Nikki/ch-001",
"title": "Chapter 01 - Beginning"
}
KissManga
Get Mangas
NOTE: Website will ban your IP when using this module, only use it if you have dynamic IP!
Function to parse mangas from the website. The manga list is scattered over multiple website pages, where each page contains roughly 50 mangas.
- Parameter is optional, the start page (website) that should be used [default=1].
- Parameter is optional, the end page (website) that should be used [default=autodetect].
const { KissManga } = require('hakuneko');
var scraper = new KissManga();
scraper.getMangaList(1, 2)
.then(mangas => console.log(mangas))
.catch(error => console.error(error))
MangaGo
Get Mangas
NOTE: Website will ban your IP when using this module, only use it if you have dynamic IP!
Function to parse mangas from the website. The manga list is scattered over multiple website pages, where each page contains roughly 44 mangas.
- Parameter is optional, the start page (website) that should be used [default=1].
- Parameter is optional, the end page (website) that should be used [default=autodetect].
const { MangaGo } = require('hakuneko');
var scraper = new MangaGo();
scraper.getMangaList(1, 2)
.then(mangas => console.log(mangas))
.catch(error => console.error(error))