김대선

programmersFunction.js 오류 수정

...@@ -79,5 +79,3 @@ const getData = async ()=>{ ...@@ -79,5 +79,3 @@ const getData = async ()=>{
79 module.exports = { 79 module.exports = {
80 getData : getData 80 getData : getData
81 } 81 }
82 -
83 -getData()
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -61,6 +61,7 @@ const getData = async ()=>{ ...@@ -61,6 +61,7 @@ const getData = async ()=>{
61 while(true){ 61 while(true){
62 await page.goto(`https://programmers.co.kr/job?page=${count}`) 62 await page.goto(`https://programmers.co.kr/job?page=${count}`)
63 content = await page.content() 63 content = await page.content()
64 + console.log( final, count)
64 if(final < count){ 65 if(final < count){
65 console.log("finish", result.length) 66 console.log("finish", result.length)
66 break; 67 break;
...@@ -86,8 +87,8 @@ const getData = async ()=>{ ...@@ -86,8 +87,8 @@ const getData = async ()=>{
86 } 87 }
87 result = result.concat(await makeObject(resArr)) 88 result = result.concat(await makeObject(resArr))
88 count = count + 1 89 count = count + 1
89 - resArr = []
90 } 90 }
91 + console.log(result)
91 return result 92 return result
92 } 93 }
93 94
......