fix(route): 中国海洋大学教务处 (#14810)
* fix(route): ouc/jwc * move control statement
This commit is contained in:
parent
bd2874ccaa
commit
3b37bbd177
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue