Skip to content

Commit 5300a99

Browse files
committed
sync html parser
1 parent 0b4e359 commit 5300a99

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

excel/excelParser.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,28 @@ for(const [i, r] of records.entries()) {
1313
}
1414

1515
const crawler = async () => {
16-
await Promise.all(records.map( async (r) => {
16+
for (const [i, r] of records.entries()) {
1717
const response = await axios.get(r.링크);
1818
if (response.status === 200) {
1919
const html = response.data;
2020
const $ = cheerio.load(html);
2121
const text = $('.score.score_left .star_score').text();
2222
console.log(r.제목, '평점', text.trim());
2323
}
24-
}));
24+
}
2525
};
26+
27+
// const crawler = async () => {
28+
// await Promise.all(records.map( async (r) => {
29+
// const response = await axios.get(r.링크);
30+
// if (response.status === 200) {
31+
// const html = response.data;
32+
// const $ = cheerio.load(html);
33+
// const text = $('.score.score_left .star_score').text();
34+
// console.log(r.제목, '평점', text.trim());
35+
// }
36+
// }));
37+
// };
38+
// 순서 보장하지 않음
39+
2640
crawler();

0 commit comments

Comments
 (0)