MangaScrape
MangaScrape is a tool designed to scrape various manga sources providing easy access to manga data and chapters.
🛠️ Installation
npm i mangascrape
🧐 Features
- Scrape mangas easily
- Fully typed
- Multiple sources
🌐 Sources
- Bato.to
- MangaBuddy
- Mangakakalot
- Mangadex
⌨️ Usage
const { Batoto } = require("mangascrape");
const batoto = new Batoto();
async function getFirstChapter() {
const manga = await batoto.search({
query: "Demon Slayer",
genres: { include: { ContentTag: ["Shounen"] } },
});
if (manga.results.length < 1) return [];
const detailed = await batoto.id(manga.results[0].id);
if (detailed == undefined) return [];
const chapter = await batoto.chapter(detailed.id, detailed.chapters[0].id);
return chapter;
}
getFirstChapter().then(console.log).catch(console.error);