Welcome to the API documentation for Manga-collector. Below you’ll find detailed information on the available methods, including descriptions and usage examples.
getDetailedManga(url: string)
Fetches detailed information about a specific manga.
Usage Example
import { MangaScraperFactory, MangaSource } from "@akiosarkiz/manga-collector";
const main = async () => {
const url = "https://toonily.com/webtoon/eleceed/";
// First we need make a scraper via factory
const scraper = await MangaScraperFactory.make(MangaSource.TOONILY);
// Second we scrape data from the website
const result = await scraper.getDetailedManga(url);
// Then we can see the result of scraping
console.log(result);
};
main()
.then(() => console.log("Done"))
.catch(console.error);
getDetailedChapter(url: string)
Fetches detailed information about a specific chapter of a manga.
Usage Example
import { MangaScraperFactory, MangaSource } from "@akiosarkiz/manga-collector";
const main = async () => {
const url = "https://toonily.com/webtoon/not-a-lady-anymore/chapter-1/";
// First we need make a scraper via factory
const scraper = await MangaScraperFactory.make(MangaSource.TOONILY);
// Second we scrape data from the website
const result = await scraper.getDetailedChapter(url);
// Then we can see the result of scraping
console.log(result);
};
main()
.then(() => console.log("Done"))
.catch(console.error);
getLatestUpdates(page?: number)
Fetches the latest updates of mangas from various sources.
Usage Example
import { MangaScraperFactory, MangaSource } from "@akiosarkiz/manga-collector";
const main = async () => {
// First we need make a scraper via factory
const scraper = await MangaScraperFactory.make(MangaSource.TOONILY);
// Second we scrape data from the website
const firstPage = await scraper.getLatestUpdates();
const secondPage = await scraper.getLatestUpdates(2);
// Then we can see the result of scraping
console.log(firstPage);
console.log(secondPage);
};
main()
.then(() => console.log("Done"))
.catch(console.error);
search(query: string)
Finds mangas based on a search query.
Usage Example
import { MangaScraperFactory, MangaSource } from "@akiosarkiz/manga-collector";
const main = async () => {
// First we need make a scraper via factory
const scraper = await MangaScraperFactory.make(MangaSource.TOONILY);
// Second we scrape data from the website
const list = await scraper.search("san");
// Then we can see the result of scraping
console.log(list);
};
main()
.then(() => console.log("Done"))
.catch(console.error);