Skip to content

2noScript/plugin-books-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Plugin Books Pro

npm version

A powerful library for crawling manga and novel content from various sources.

Mode Develop

yarn dev:[supplier-name]

Build

yarn build

Installation

yarn add plugin-books-pro

Usage

import { Books, Suppliers } from "plugin-books-pro"
import { BrowserWorker } from "t2-browser-worker"

const worker = new BrowserWorker()
const books = new Books()

const crawler = books.build(Suppliers.TruyenQQ)

// Start crawling
const result = await worker.runTask(async page => {
    return await crawler.crawl(page)
})

Crawl Response Data

Example response:

{
    top: {
        dataType: "Top",
        status: "SUCCESS",
        data: [
            {
                identifier: "ONE PIECE",
                name: "One Piece",
                rank: 1,
                view: 1500000,
                like: 50000,
                follow: 100000,
                tags: "Action,Adventure,Comedy,Fantasy,Shounen",
                lastChapter: 1108,
                author: "Oda Eiichiro",
                comment: 3000,
                imageUrlThumbnail: "https://example.com/one-piece.jpg",
                imagePathThumbnail: "/images/manga/one-piece.jpg",
                description: "Gol D. Roger was known as the Pirate King...",
                link: "https://mangadex.org/title/a1c7c817-4e59-43b7-9365-09675a149a6f"
            },
            // ... more items
        ]
    },
    bookNew: {
        dataType: "New",
        status: "SUCCESS",
        data: [
            {
                identifier: "JUJUTSU KAISEN",
                name: "Jujutsu Kaisen",
                rank: 1,
                view: 500000,
                like: 20000,
                follow: 50000,
                tags: "Action,Supernatural,School Life,Shounen",
                lastChapter: 253,
                author: "Gege Akutami",
                comment: 1500,
                imageUrlThumbnail: "https://example.com/jjk.jpg",
                imagePathThumbnail: "/images/manga/jujutsu-kaisen.jpg",
                description: "A boy fights... to help people...",
                link: "https://mangadex.org/title/c52b2ce3-7f95-469c-96b0-479524fb7a1a"
            }
        },
}

Book Fields

Field Type Required Description
rank number βœ“ Position in the list
identifier string βœ“ Unique identifier (normalized name)
name string βœ“ Book title
link string βœ“ URL to book page
imageUrlThumbnail string βœ“ Cover image URL
view number View count
like number Like count
follow number Follow/bookmark count
tags string Categories/genres (comma-separated)
lastChapter number Latest chapter number
author string Author name
comment number Comment count
imagePathThumbnail string Local path to cover image
description string Book synopsis
rating number Rating score (0-5)

Manga Sources

Status Icon Key URL
βœ“ TruyenQQ https://truyenqqto.com
βœ“ Manhuavn https://manhuavn.top
ManhuaRock https://manhuarock2.site
MangaToon https://mangatooncom.vn
βœ“ Mangadex https://mangadex.org
NaverComic https://comic.naver.com

Novel Sources

Status Icon Key URL
βœ“ Metruyencv https://metruyencv.com
TruyenFull https://truyenfull.vision
XaloSach https://xalosach.com
SSTruyen https://sstruyen.vn
TruyenYY https://truyenyy.xyz

Dependencies

Releases

No releases published

Packages

No packages published