@fubasi/kkmh
v0.0.2
Published
Node.js client for kuaikanmanhua.com
Downloads
4
Readme
connectors-kkmh
Node.js client for kuaikanmanhua.com
Installing
npm install @fubasi/kkmh
Usage
const { KkmhConnector, KkmhIdentity } = require('@fubasi/kkmh');
const { promises: fs } = require('fs');
const user = new KkmhIdentity('+12223334455', 'examplepassword');
const client = new KkmhConnector(user);
client.chapter(382057).then(manifest => {
// Metadata for chapter
console.log('Manifest:', manifest);
// Downloading first chunk of first page
return client.image(manifest.chunks[0][0]);
}).then(image => {
console.log('Image size:', image.length);
// Save chunk to file
return fs.writeFile('test.jpg', image);
}).then(() => {
console.log('Done!');
});