diff --git a/lib/routes/sjtu/jwc.ts b/lib/routes/sjtu/jwc.ts index 0b726132a88769..3930f8f6a29780 100644 --- a/lib/routes/sjtu/jwc.ts +++ b/lib/routes/sjtu/jwc.ts @@ -7,7 +7,10 @@ import { parseDate } from '@/utils/parse-date'; const urlRoot = 'https://jwc.sjtu.edu.cn/xwtg'; async function getFullArticle(link) { - const response = await got(link); + const response = await got(link).catch(() => null); + if (!response) { + return null; + } const $ = load(response.body); const content = $('.content-con'); if (content.length === 0) {