@boboiboyturuuu/kiryuu-scrape
v1.0.6
Published
scraper manga kiryuu
Downloads
5
Readme
@boboiboyturuuu/kiryuu-scrape
Fitur
- Fetch Manga Details: Mengambil detail dari sebuah halaman manga.
- Search Manga: Mencari manga berdasarkan keyword yang diberikan.
- Download Manga: Mendownload file manga dari sebuah URL.
Instalasi
npm install @boboiboyturuuu/kiryuu-scrape
Contoh Penggunaan
Mengambil Detail Manga
Anda dapat mengambil detail dari sebuah halaman manga dengan menggunakan fungsi mangadetails
:
import { mangadetails } from '@boboiboyturuuu/kiryuu-scrape';
async function getMangaDetails() {
const url = 'https://kiryuu.org/manga/one-piece/';
const details = await mangadetails(url);
console.log(details);
}
getMangaDetails();
##Contoh Respon
{
"title": "One Piece",
"author": "Eiichiro Oda",
"artist": "Eiichiro Oda",
"status": "Ongoing",
"genres": ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Shounen"],
"description": "Gol D. Roger was known as the Pirate King, the strongest and most infamous being to have sailed the Grand Line...",
"cover": "https://kiryuu.id/wp-content/uploads/2020/12/one-piece-cover.jpg",
"chapters": [
{
"title": "Chapter 1000: Straw Hat Luffy",
"release_date": "January 1, 2021",
"url": "https://kiryuu.id/one-piece-chapter-1000/"
},
{
"title": "Chapter 999: The Sake I Brewed to Drink With You",
"release_date": "December 25, 2020",
"url": "https://kiryuu.id/one-piece-chapter-999/"
}
// ... More chapters
]
}
Mencari Manga
Gunakan fungsi search
untuk mencari manga berdasarkan kata kunci tertentu:
import { search } from '@boboiboyturuuu/kiryuu-scrape';
async function searchManga() {
const query = 'naruto';
const results = await search(query);
console.log(results);
}
searchManga();
##Contoh Respon
[
{
"title": "Naruto",
"url": "https://kiryuu.id/manga/naruto/",
"cover": "https://kiryuu.id/wp-content/uploads/2020/12/naruto-cover.jpg"
},
{
"title": "Naruto Gaiden: The Seventh Hokage",
"url": "https://kiryuu.id/manga/naruto-gaiden-the-seventh-hokage/",
"cover": "https://kiryuu.id/wp-content/uploads/2020/12/naruto-gaiden-cover.jpg"
}
// ... More results
]
Mendownload Manga
Anda juga bisa mendownload file manga dari sebuah URL menggunakan fungsi download
:
import { download } from '@boboiboyturuuu/kiryuu-scrape';
async function downloadManga() {
const url = 'https://kiryuu.org/manga/one-piece/chapter-1000/';
const filePath = await download(url);
console.log('File downloaded to:', filePath);
}
downloadManga();
API
mangadetails(url: string): Promise<Object>
Mengambil detail manga dari halaman Kiryuu.
- url: URL halaman manga yang ingin diambil detailnya.
- Returns: Objek yang berisi detail manga.
search(query: string): Promise<Array<Object>>
Mencari manga berdasarkan query.
- query: Kata kunci yang ingin dicari.
- Returns: Array hasil pencarian, atau
null
jika tidak ada hasil.
download(url: string): Promise<string>
Mendownload file manga dari halaman Kiryuu.
- url: URL halaman manga atau chapter yang ingin didownload.
- Returns: Path ke file yang didownload.
Author
Library ini dikembangkan oleh Boboiboyturuuu.