fix(route): 中国海洋大学教务处 (#14810)

* fix(route): ouc/jwc

* move control statement
This commit is contained in:
2024-03-17 00:17:31 +08:00 committed by GitHub
parent bd2874ccaa
commit 3b37bbd177
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ async function handler() {
const a = e.find('a');
return {
title: a.attr('title'),
link: a.attr('href'),
link: a.attr('href').startsWith('http') ? a.attr('href') : 'https://jwc.ouc.edu.cn' + a.attr('href'),
pubDate: parseDate(e.find('span.Article_PublishDate').text(), 'YYYY-MM-DD'),
};
});
@ -47,7 +47,7 @@ async function handler() {
const out = await Promise.all(
list.map((item) =>
cache.tryGet(item.link, async () => {
const response = await got('https://jwc.ouc.edu.cn' + item.link);
const response = await got(item.link);
const $ = load(response.data);
item.author = '中国海洋大学教务处';
item.description = $('.wp_articlecontent').html();