Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@bochilteam/scraper/lib/cjs/primbons/artinama.js
1126 views
1
"use strict";
2
var __importDefault = (this && this.__importDefault) || function (mod) {
3
return (mod && mod.__esModule) ? mod : { "default": mod };
4
};
5
Object.defineProperty(exports, "__esModule", { value: true });
6
const got_1 = __importDefault(require("got"));
7
async function artinama(nama) {
8
var _a, _b, _c;
9
const data = await (0, got_1.default)(`https://www.primbon.com/arti_nama.php?nama1=${nama}&proses=+Submit%21+`).text();
10
const results = (_c = (_b = (_a = data
11
.split('<h1>ARTI NAMA</h1><br>')[1]) === null || _a === void 0 ? void 0 : _a.split('<TABLE>')[0]) === null || _b === void 0 ? void 0 : _b.replace(/<(\/)?(h1|br|i|b)>/gim, '')) === null || _c === void 0 ? void 0 : _c.trim();
12
return results || '';
13
}
14
exports.default = artinama;
15
//# sourceMappingURL=artinama.js.map
16