김대선

naverFunction 오류 수정

......@@ -44,16 +44,21 @@ const getData = async ()=>{
await page.goto('https://recruit.navercorp.com/naver/job/list/developer')
let content = await page.content()
let temp = null;
while(true){
if (temp == content) break;
let temp = "";
let Flag = true
while(Flag){
if (temp == content){
Flag = false
break;
}
else{
temp = await page.content()
temp = content
await page.click('#moreDiv > button').catch((error)=>{
Flag = false
})
await page.waitForTimeout(1500)
content = await page.content()
}
}
let $ = cheerio.load(content, {decodeEntities: true})
......@@ -73,4 +78,6 @@ const getData = async ()=>{
module.exports = {
getData : getData
}
\ No newline at end of file
}
getData()
\ No newline at end of file
......