mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 23:42:40 +08:00
fix(route): handle error when fetching sjtu/jwc article (#16448)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user