Git Product home page Git Product logo

mangakakalotscrapper's Introduction

MangaKakalotScrapper

NPM

A scrapper for MangaKakalot

Documentation


Installation

yarn add mangakakalot-scrapper

Usage Examples

import { searchManga } from 'mangakakalot-scrapper'
;(async () => {
    //searches for manga
    const { data } = await searchManga(
        'Fairy Tail' /** name of the manga to search */,
        1 /** Page number of the search*/
    )
    const manga = data[0]
    //gets the details of the manga
    const details = await manga.getInfo()
    const chapters = details.chapters
    console.log(`${details.name} has ${chapters.length} chapters.`)
    const chapter = chapters[0]
    //gets the pages of the chapter
    const pages = await chapter.getPages()
    console.log(pages)
    //downloads the chapter pages and saves it in a folder
    await pages.download('Fairy Tail Ch-1') 
})()
import { getManga } from 'mangakakalot-scrapper'

//id of the manga from mangakakalot --> https://ww3.mangakakalot.tv/manga/manga-kw951979
const id = 'kw951979'
getManga(id)
    .then((res) => console.log(res))
    .catch((err) => console.error(err))
import { getChapterPages } from 'mangakakalot-scrapper'

//id of the chapter --> https://ww3.mangakakalot.tv/chapter/manga-kw951979/chapter-228
const id = 'kw951979/chapter-228'
getChapterPages(id)
    .then(async (res) => {
        console.log(res)
        //builds a PDF of the chapter pages and saves it
        await res.PDF('Nisekoi-228.pdf') //it will return a Buffer if no filename is provided
    })
    .catch((err) => console.error(err))

mangakakalotscrapper's People

Contributors

luckyyam avatar kartoffelchipss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.