an-anime-scraper
v2.0.0
Published
A simple anime scraper which provides info on specified animes
Downloads
2
Maintainers
Readme
Installation
npm i an-anime-scraper
Description
an-anime-scraper is a scraper created to make anime scraping easier and implement in your programs. Currently only one website (gogoanime.ai) is supported
Important Note: This package is also inspired from ctk-anime-scraper package. You can checkout ctk's package by clicking on the name :)
Usage Examples
- Anime#animeInfo()
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.animeInfo('rezero').then(data => {
console.log(data)
})
- Anime#animeInfoFetch()
// Example #1
// Example with anime NAME as parameter
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.animeInfoFetch("re:zero").then(data => {
console.log(data)
})
// Example #2
// Example with anime URL as parameter
// NOTE: if passing a url instead of name the second parameter must be set true. It is set to false by default
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.animeInfoFetch("https://www1.gogoanime.ai/category/rezero-kara-hajimeru-isekai-seikatsu", true).then(data => {
console.log(data)
})
- Anime#searchAnime()
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.searchAnime("horimiya").then(list => {
console.log(list)
})
- Anime#getEpLinks()
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.getEpLinks("https://www1.gogoanime.ai/category/rezero-kara-hajimeru-isekai-seikatsu").then(links => {
console.log(links)
})
- Anime#getInfo()
const { Anime } = require('an-anime-scraper')
const anime = new Anime("gogoanime.ai")
anime.getInfo("https://www1.gogoanime.ai/category/rezero-kara-hajimeru-isekai-seikatsu").then(data => {
console.log(data)
})
Methods
Anime.animeInfo() // Gets data of an anime by name. Gives weird results idk
Anime.animeInfoFetch() // Gets data of an anime by NAME or URL. More preffered but is case-sensitive like in symbols and spaces... yea!
Anime.searchAnime() // Searches for an anime by name and returns array of all anime links, imgs, names and release dates :L
Anime.getEpLinks() // Gets all episode links of the provided anime URL
Anime.getInfo() // Gets data of an anime by URL
Update Changes (2.0.0):
- Added new method searchAnime
- GetEpisodes method is now getEpLinks
- animeInfoFetch method can now take url as a parameter by setting second parameter true
- More error handlers added
Dependencies
Ending
I hope that concludes, here's a cookie 🍪