一切都如标题中所说。某种像“...”这样的 krakozyabry 出来了。怎么修?
app.get('/rplTopScores', (req, res) => {
res.send(rplTopScores);
});
await axios('https://www.sport-express.ru/football/L/russia/premier/2022-2023/statistics/bombardiers/') // rplTopScores
.then(response => response.data)
.then(response => {
const $ = cheerio.load(response);
$('table.se19-table-statistics tr').each((i, element) => {
rplTopScores.push({
player: $(element).find('.se19-table-statistics__td--name a').text()
});
console.log($(element).find('.se19-table-statistics__td--name a').text());
});
})
.catch(err => console.log(err));
node.js v18.7.0
使用 axios,可以这样完成: