feat(route): add 管理世界杂志社网络首发 (#8880)

This commit is contained in:
Ethan Shen 2022-01-23 04:25:35 +08:00 committed by GitHub
parent 27cff2bf43
commit 42213e6de0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -301,9 +301,9 @@ _仅支持 Science 主刊_
<Route author="nczitzk" example="/mvm" path="/mvm/:category?" :paramsDesc="['分类,见下表,默认为本期要目']">
| 本期要目 | 学术活动 | 通知公告 |
| -------- | -------- | -------- |
| bqym | xshd | tzgg |
| 本期要目 | 网络首发 | 学术活动 | 通知公告 |
| -------- | -------- | -------- | -------- |
| bqym | wlsf | xshd | tzgg |
</Route>

View File

@ -17,19 +17,19 @@ module.exports = async (ctx) => {
$('.n_date').remove();
const list = $('.n_title, .con1_text')
.map((_, item) => {
let items = $('.n_title, .con1_text')
.toArray()
.map((item) => {
item = $(item);
return {
title: item.text(),
link: `${rootUrl}${item.attr('href')}`,
};
})
.get();
});
const items = await Promise.all(
list.map((item) =>
items = await Promise.all(
items.map((item) =>
ctx.cache.tryGet(item.link, async () => {
const detailResponse = await got({
method: 'get',