mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 23:42:40 +08:00
fix(swust): allow item empty (#2820)
This commit is contained in:
@@ -7,9 +7,7 @@ module.exports = async (ctx) => {
|
||||
headers: {
|
||||
Referer: host,
|
||||
},
|
||||
responseType: 'buffer',
|
||||
});
|
||||
|
||||
const type = ctx.params.type || 1;
|
||||
let info = '新闻动态';
|
||||
let word = 'news';
|
||||
@@ -27,7 +25,6 @@ module.exports = async (ctx) => {
|
||||
const response = await got_ins.get(host + word);
|
||||
const $ = cheerio.load(response.data);
|
||||
const text = $('a', '.list.list3');
|
||||
|
||||
const resultItems = await Promise.all(
|
||||
text.toArray().map(async (item) => {
|
||||
const $item = $(item);
|
||||
@@ -72,6 +69,7 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
allowEmpty: true,
|
||||
title: `西南科技大学 计科学院 ${info}`,
|
||||
link: host + word,
|
||||
description: `西南科技大学 计科学院 ${info}`,
|
||||
|
||||
@@ -45,6 +45,7 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
allowEmpty: true,
|
||||
title: '西南科技大学教务处 新闻',
|
||||
link: host,
|
||||
description: '西南科技大学教务处 新闻',
|
||||
|
||||
@@ -51,6 +51,7 @@ module.exports = async (ctx) => {
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
allowEmpty: true,
|
||||
title: '西南科技大学教务处 ' + info,
|
||||
link: tag + tag_url,
|
||||
description: `西南科技大学教务处 ${info}`,
|
||||
|
||||
Reference in New Issue
Block a user