유병우

Update mari command

......@@ -32,5 +32,22 @@ module.exports = {
.setLabel("현재 마리샵 정보 조회")
.setStyle("SECONDARY")
);
async function getHTML() {
try {
return await axios.get("https://lostark.game.onstove.com/Shop#mari");
} catch (error) {
console.error(error);
}
};
await getHTML().then(html => {
const $ = cheerio.load(html.data);
const bodyList = $("ul.list-items").children("li");
bodyList.each(function(i, elem) {
itemInfo[i] = {
name: $(this).find("span.item-name").text(),
amount: $(this).find("span.amount").text()};
});
return itemInfo;
});
},
};
\ No newline at end of file
......