Manladag core is used to download your favorite manga
import {Lib as GoodLib} from 'a-good-lib'
import { ManladagSource, ChapterDownloaderFlags } from '@manladag/core'
const mdg = new ManladagCore(GoodLib);
mdg
.setOnDownloadChapterStartedListener(() => {
console.log('Download has started !');
})
.setOnDownloadPageFinishedListener(({page, pageCount}) => {
console.log(`${page}/${pageCount}`);
})
.setOnDownloadChapterFinishedListener(() => {
console.log('Download has finished !');
}).
getLastChapter('one-piece').then((chapter) => {
mdg.createChapterDownloader('one-piece', chapter, __dirname, ChapterDownloaderFlags.INIT.AUTO_START, {
clearFiles: {onFinish: true, onError: true},
mlag: {path: __dirname},
});
});
In this example the library Source Lelscan was used to download the last chapter of One Piece available on his website into a .mlag
file inside the folder __dirname
Your favorite library is missing ? create your own lib !
Visit the lib/example folder
Visit the api web