Comparing version 1.1.1 to 1.1.2
const axios = require("axios"); | ||
const cheerio = require("cheerio"); | ||
const loghandler = { | ||
noinput: "No Querry Input! Baakaa >\/\/<", | ||
er: "=> Error:" | ||
}; | ||
/* | ||
@@ -11,3 +16,3 @@ * @Emojipedia | ||
if (!emoji) { | ||
return "No Querry Input! Bakaaa >\/\/<"; | ||
return loghandler.noinput; | ||
} else if (emoji.length > 2) { | ||
@@ -57,3 +62,3 @@ return "Kebanyakan Dodol :( Minimal 1 Query"; | ||
} catch (error404) { | ||
return "=> Error => " + error404; | ||
return loghandler.er + error404; | ||
} | ||
@@ -60,0 +65,0 @@ }; |
@@ -7,2 +7,3 @@ const axios = require('axios') | ||
*/ | ||
const layarkaca_ = async (pilem) => { | ||
@@ -44,2 +45,3 @@ if (!pilem) { | ||
*/ | ||
const palingmurah_ = async (produk) => { | ||
@@ -115,6 +117,82 @@ if (!produk) { | ||
/* | ||
* @Mangatoon - Search | ||
*/ | ||
const Mangatoon = async (search) => { | ||
if (!search) return "No Querry Input! Bakaa >\/\/<"; | ||
try { | ||
const res = await axios.get(`https://mangatoon.mobi/en/search?word=${search}`, { | ||
method: "GET", | ||
headers: { | ||
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36" | ||
} | ||
}); | ||
const hasil = []; | ||
const $ = cheerio.load(res.data); | ||
$('div.recommend-item').each(function(a, b) { | ||
let comic_name = $(b).find('div.recommend-comics-title > span').text(); | ||
let comic_type = $(b).find('div.comics-type > span').text().slice(1).split(/ /g).join(""); | ||
let comic_url = $(b).find('a').attr('href'); | ||
let comic_thumb = $(b).find('img').attr('src'); | ||
const result = { | ||
status: res.status, | ||
creator: "@dehan_j1ng", | ||
comic_name, | ||
comic_type, | ||
comic_url: 'https://mangatoon.mobi' + comic_url, | ||
comic_thumb | ||
}; | ||
hasil.push(result); | ||
}); | ||
let filt = hasil.filter(v => v.comic_name !== undefined && v.comic_type !== undefined); | ||
return filt; | ||
} catch (eror404) { | ||
return "=> Error =>" + eror404; | ||
} | ||
} | ||
/* | ||
* @Whatsapp Mods - Search | ||
*/ | ||
const WAMods = async (search) => { | ||
if (!search) return "No Querry Input! Bakaaa >\/\/<"; | ||
try { | ||
const res = await axios.request(`https://www.whatsappmods.net/search?q=${search}`, { | ||
method: "GET", | ||
headers: { | ||
"User-Agent": "Mozilla/5.0 (Linux; Android 9; Redmi 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36" | ||
} | ||
}); | ||
let hasil = []; | ||
const $ = cheerio.load(res.data); | ||
$('div.gmr-clearfix').each(function(a, b) { | ||
let apk_name = $(b).find('h2.post-title.entry-title > a').text(); | ||
let apk_url = $(b).find('a').attr('href'); | ||
let apk_image = $(b).find('img.post-thumbnail').attr('src'); | ||
let apk_desc = $(b).find('div.post-item.entry-content').text().split(/[\n]|-| /g).join(""); | ||
const result = { | ||
status: res.status, | ||
creator: "@dehan_j1ng", | ||
apk_name, | ||
apk_url, | ||
apk_image, | ||
apk_desc | ||
}; | ||
hasil.push(result); | ||
}); | ||
akhir = hasil.filter(v => v.apk_name !== ''); | ||
return akhir; | ||
} catch (error404) { | ||
return "=> Error =>" + error404; | ||
} | ||
} | ||
module.exports = { | ||
palingmurah_, | ||
layarkaca_, | ||
Amino_ | ||
Amino_, | ||
Mangatoon, | ||
WAMods | ||
} | ||
@@ -121,0 +199,0 @@ |
@@ -34,2 +34,4 @@ const news = require("./database/news.js"); | ||
exports.AminoApps = search.Amino_; | ||
exports.Mangatoon = search.Mangatoon; | ||
exports.WAModsSearch = search.WAMods; | ||
exports.Emojis = other.Emojing_; |
{ | ||
"name": "dhn-api", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "An Example Api's", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,3 +48,3 @@ # Installing | ||
const API = await dhn_api; | ||
console.log(API) | ||
console.log(API); | ||
})(); | ||
@@ -86,2 +86,4 @@ ``` | ||
AminoApps: [AsyncFunction: Amino_], | ||
Mangatoon: [AsyncFunction: Mangatoon], | ||
WAModsSearch: [AsyncFunction: WAMods], | ||
Emojis: [AsyncFunction: Emojing_] | ||
@@ -135,2 +137,4 @@ } | ||
| 3 | AminoApps Search | | ||
| 4 | Mangatoon Search | | ||
| 5 | Whatsapp Mods Search | | ||
<br> | ||
@@ -137,0 +141,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
37441
1206
146