송용우

Update getBJ function parameter

const axios = require("axios");
const cheerio = require("cheerio");
let userid_test = "syw5141";
const getHtml = async (userid) => {
exports.getBJ = function (userid) {
const getHtml = async (userid) => {
try {
return await axios.get("https://www.acmicpc.net/user/" + userid);
} catch (error) {
console.log(error);
}
};
};
getHtml(userid_test).then((html) => {
getHtml(userid).then((html) => {
let psList = [];
const $ = cheerio.load(html.data);
const $bodyList = $("div.panel-body").children();
......@@ -25,6 +26,5 @@ getHtml(userid_test).then((html) => {
console.log(psList);
return psList;
});
//body > div.wrapper > div.container.content > div.row > div:nth-child(2) > div:nth-child(3) > div.col-md-9 > div:nth-child(1) > div.panel-body
});
};
......