npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@boboiboyturuu_nih/kiryuu-scraper

v1.2.3

Published

Scraper API for Kiryuu manga site

Downloads

8

Readme

Kiryuu Scraper

Kiryuu Manga Scraper adalah sebuah paket Node.js untuk mengambil informasi detail, melakukan pencarian, dan mengunduh manga dari situs Kiryuu. Paket ini menggunakan axios untuk permintaan HTTP, cheerio untuk scraping data dari HTML, dan fs untuk penulisan file.

Fitur

  • Mengambil detail manga dari halaman manga spesifik.
  • Mencari manga berdasarkan kata kunci.
  • Mengunduh file manga dari halaman manga atau chapter.

Instalasi

Install paket ini menggunakan npm:

npm install kiryuu-scraper

Penggunaan

Berikut adalah contoh penggunaan untuk setiap fungsi yang tersedia.

1. Mengambil Detail Manga

Anda dapat mengambil detail dari manga tertentu dengan memberikan URL dari halaman manga.

import { mangadetails } from 'kiryuu-scraper';

(async () => {
    try {
        const details = await mangadetails('https://kiryuu.org/manga/one-piece/');
        console.log(details);
    } catch (error) {
        console.error('Error:', error.message);
    }
})();

Contoh Respon

{
    "title": "Example Manga",
    "altTitle": "Another Title",
    "thumbnail": "https://kiryuu.org/wp-content/uploads/example-thumbnail.jpg",
    "rating": "8.5",
    "description": "This is a brief description of Example Manga.",
    "latestChapter": "Chapter 10",
    "latestChapterUrl": "https://kiryuu.org/manga/example-manga/chapter-10/",
    "status": "Ongoing",
    "type": "Shounen",
    "released": "2021",
    "author": "John Doe",
    "artist": "Jane Smith",
    "serialization": "Weekly Shounen Jump",
    "postedBy": "Uploader123",
    "postedOn": "2021-07-01",
    "updatedOn": "2021-07-15",
    "views": "15000",
    "url": "https://kiryuu.org/manga/example-manga/"
}

2. Mencari Manga

Anda dapat mencari manga dengan kata kunci tertentu.

import { mangasearch } from 'kiryuu-scraper';

(async () => {
    try {
        const results = await mangasearch('naruto');
        console.log(results);
    } catch (error) {
        console.error('Error:', error.message);
    }
})();

Contoh Respon

[
    {
        "title": "Naruto",
        "link": "https://kiryuu.org/manga/naruto/",
        "thumbnail": "https://kiryuu.org/wp-content/uploads/naruto-thumbnail.jpg",
        "chapter": "Chapter 700",
        "rating": "9.0"
    },
    {
        "title": "Naruto Shippuden",
        "link": "https://kiryuu.org/manga/naruto-shippuden/",
        "thumbnail": "https://kiryuu.org/wp-content/uploads/naruto-shippuden-thumbnail.jpg",
        "chapter": "Chapter 700",
        "rating": "9.5"
    }
]

3. Mengunduh Manga

Anda dapat mengunduh file manga dari halaman manga atau chapter.

import { mangadownload } from 'kiryuu-scraper';

(async () => {
    try {
        const filePath = await mangadownload('https://kiryuu.org/manga/one-piece/chapter-1000/');
        console.log('File downloaded to:', filePath);
    } catch (error) {
        console.error('Error:', error.message);
    }
})();

Contoh Respon

{
    "filePath": "/path/to/your/directory/example-manga-chapter-1.zip"
}

API

mangadetails(url: string): Promise<object>

Mengambil detail dari manga berdasarkan URL spesifik.

Parameter:

  • url (string): URL dari halaman manga di Kiryuu.

Mengembalikan:

  • Promise<object>: Objek berisi detail manga.

mangasearch(query: string): Promise<array>

Mencari manga berdasarkan query.

Parameter:

  • query (string): Kata kunci pencarian.

Mengembalikan:

  • Promise<array>: Daftar hasil pencarian manga.

mangadownload(url: string): Promise<string>

Mengunduh file manga dari URL spesifik.

Parameter:

  • url (string): URL dari halaman manga atau chapter di Kiryuu.

Mengembalikan:

  • Promise<string>: Path dari file yang telah diunduh.

Error Handling

Semua fungsi yang disediakan akan melemparkan error jika terjadi masalah, seperti jika URL tidak valid atau tidak ada hasil yang ditemukan. Pastikan Anda menangkap error ini dengan menggunakan try...catch.

Lisensi

Paket ini dilisensikan di bawah MIT License. Lihat file LICENSE untuk detail lebih lanjut.

Kontribusi

Kontribusi terbuka untuk siapa saja. Jika Anda menemukan bug atau ingin menambahkan fitur baru, silakan kirimkan pull request atau buat issue di repository GitHub.


Terima kasih telah menggunakan Kiryuu Scraper!