scrapes videos from animepill
npm install --save animepill-api
const Anime = require("animepill-api");
const client = new Anime();
client.getEpisodes("bleach")
.then(eps => eps[3].getEpisode())
.then(vids => console.log(vids));
client.search("bleach")
.then(res => {
return res.find(x => x.type === "TV")
.getEpisodes();
})
.then(eps => console.log(eps));
Kind: global class
- Anime
- new Anime(prefix, url)
- .search(query) ⇒
Promise.<Array.<Object>>
- .getEpisodes(slug) ⇒
Promise.<Object>
- .getEpisode(slug) ⇒
Promise.<Array.<Object>>
constructor, instantiates the object
Param | Type | Description |
---|---|---|
prefix | string |
it uses this in front of the request, you could use this to prevent cors errors in browsers |
url | string |
the url to make request to, default: http://animepill.com |
searches for anime
Kind: instance method of Anime
Returns: Promise.<Array.<Object>>
- an array with results
Param | Type | Description |
---|---|---|
query | string |
what you are searching for |
gets episodes of an anime
Kind: instance method of Anime
Returns: Promise.<Object>
- an object with all the episodes
Param | Type | Description |
---|---|---|
slug | string |
the slug of an anime you can get a slug in a search |
searches for anime
Kind: instance method of Anime
Returns: Promise.<Array.<Object>>
- an array with the episode mp4 uri
Param | Type | Description |
---|---|---|
slug | string |
the slug of an anime you can get a slug in a search |