Skip to content

Commit 6e0c76a

Browse files
committed
Add pass cache logic
1 parent e7338a5 commit 6e0c76a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crawler/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class Crawler {
3232
if (this.delay > 0) await new Promise(r => setTimeout(r, this.delay * i));
3333

3434
let post = await this.getPost(postInfo.url_slug);
35+
if (!post) {
36+
console.log(`⚠️ " ${postInfo.url_slug} " 가져올 수 없는 글을 건너뛰었습니다.`);
37+
return;
38+
}
39+
3540
post.body = await this.getImage(post.body);
3641

3742
await this.writePost(post);

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)