ctk-anime-scraper
Advanced tools
Comparing version 3.0.0 to 3.5.0
@@ -1,1 +0,1 @@ | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"8d30d8ea2130fe387c7f4afeaa510e2d","lockfileHash":"edca0598dae9b9b9383b1d0c77c95618","guessedImports":["axios","cheerio"],"guessedImportsHash":"0f685e161c456b9499110c6207ea529d"}}} | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"cbef0305b16280ea404f603c87143f79","lockfileHash":"7004fb44c83683b6fd44844a9b3801c2","guessedImports":["axios","cheerio"],"guessedImportsHash":"ab28fd43e2fcf9d28132967a3a5ef67b"}}} |
{ | ||
"name": "ctk-anime-scraper", | ||
"version": "3.0.0", | ||
"version": "3.5.0", | ||
"description": "very easy to use package to scrap anime from websites", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
# INTRODUCTION | ||
**ctk-anime-scraper** is the advance and better anime scraper in compare to any other scraper that you could ever find, you can get any anime details and it's direct episode link in just few lines of codes. | ||
**ctk-anime-scraper** is the advance and better anime scraper in compare to any other scraper that you could ever find, you can get any anime details. | ||
## 4anime | ||
```js | ||
const AnimeScraper = require("ctk-anime-scraper") | ||
const FourAnime = new AnimeScraper.FourAnime() | ||
/* Search Anime */ | ||
FourAnime.search("naruto").then(results => { | ||
/* Get the top result from search and fetch that anime */ | ||
FourAnime.fetchAnime(results[0].link).then(anime => { | ||
/* Get the 1st Episode of the anime */ | ||
FourAnime.getFromLink(anime.episodes[0].link).then(episode => { | ||
/* Here you have it, Enjoy 😉 */ | ||
console.log(episode) // {Object} | ||
}) | ||
}) | ||
}) | ||
**`[ You Can not Scrap Anime Episode with this scraper only, it helps you with it but it dont scrap anime episode]`** | ||
``` | ||
```js | ||
@@ -45,12 +26,9 @@ const AnimeScraper = require("ctk-anime-scraper") | ||
- 📃 Guide/Docs: [Documents](https://ctk-doc.gitbook.io/ctk-anime-scraper/) | ||
- 💬 Discord: [Ctk's Server]([https://withwin.in/dbd](https://withwin.in/dbd)) | [Anime Hub](https://discord.io/anime_hub) | ||
- 💬 Discord: [Ctk's Server](https://withwin.in/dbd) | [Anime Hub](https://discord.io/anime_hub) | ||
- 🔨 Tools Used: [Axios](https://www.npmjs.com/package/axios) | [Cheerio](https://www.npmjs.com/package/cheerio) | ||
- 👩💻 Developers: CTK WARRIOR#7923 | ||
- Supported Websites: [Gogoanime.ai](https://gogoanime.ai/) | [Gogoanime.vc](https://gogoanime.vc/) | [4anime.to](https://4anime.to/) | ||
## FEATURES | ||
- Allows you to easily scrap any anime | ||
- Get any episode direct link of any available quality | ||
- Faster than your internet 😅 | ||
- Supports more than one website to scrap | ||
- Easy to use |
module.exports = { | ||
Gogoanime: require("./Scrapers/gogoanime.js"), | ||
FourAnime: require("./Scrapers/4anime.js") | ||
Gogoanime: require("./Scrapers/gogoanime.js") | ||
} | ||
@@ -27,22 +27,9 @@ /** | ||
let download = $("li.dowloads a").attr("href"); | ||
if (!download) throw new Error("Scraping Error: Unable to scrap the downlaod link"); | ||
htmlContent = await axios.get(download) | ||
$ = cheerio.load(htmlContent.data); | ||
if (!download) throw new Error("Scraping Error: Unable to scrap the downlaod link"); | ||
const ScrapedAnime = { | ||
name: $('span#title').text() || null, | ||
download: [], | ||
extraLink: [] | ||
name: $('div.anime_video_body h1').text() || null, | ||
episodeCount, | ||
id: download.match(/([A-Z])\w+/g)[0] | ||
} | ||
/** Get the every download link of every quality with extra links */ | ||
$("div.dowload").each(function(i, elem) { | ||
let qualityObject = {} | ||
$ = cheerio.load($(this).html()) | ||
qualityObject.quality = $('a').text().replace("Download\n", "").trim() | ||
qualityObject.link = $('a').attr("href") | ||
if (qualityObject.quality.startsWith("(")) ScrapedAnime.download.push(qualityObject) | ||
else ScrapedAnime.extraLink.push(qualityObject) | ||
}) | ||
return ScrapedAnime; | ||
@@ -49,0 +36,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
0
7461
6
137
33