feat(route): add 管理世界杂志社网络首发 (#8880)
This commit is contained in:
parent
27cff2bf43
commit
42213e6de0
|
|
@ -301,9 +301,9 @@ _仅支持 Science 主刊_
|
|||
|
||||
<Route author="nczitzk" example="/mvm" path="/mvm/:category?" :paramsDesc="['分类,见下表,默认为本期要目']">
|
||||
|
||||
| 本期要目 | 学术活动 | 通知公告 |
|
||||
| -------- | -------- | -------- |
|
||||
| bqym | xshd | tzgg |
|
||||
| 本期要目 | 网络首发 | 学术活动 | 通知公告 |
|
||||
| -------- | -------- | -------- | -------- |
|
||||
| bqym | wlsf | xshd | tzgg |
|
||||
|
||||
</Route>
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue