Showing
3 changed files
with
2 additions
and
3 deletions
... | @@ -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 | ... | ... |
-
Please register or login to post a comment