mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
style: auto format
This commit is contained in:
@@ -18,31 +18,32 @@ module.exports = async (ctx) => {
|
||||
},
|
||||
});
|
||||
|
||||
const $ = cheerio.load(res.data, {xmlMode: true});
|
||||
const $ = cheerio.load(res.data, { xmlMode: true });
|
||||
|
||||
const list = $('record');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '济南卫建委-执业考试通知',
|
||||
link: `${baseUrl}/col/col14418/index.html`,
|
||||
item: list.map((_, item) => {
|
||||
// 获取每个item对应的html字符串
|
||||
item = $(item).text();
|
||||
item: list
|
||||
.map((_, item) => {
|
||||
// 获取每个item对应的html字符串
|
||||
item = $(item).text();
|
||||
|
||||
// 解析上一步中的html
|
||||
const html = cheerio.load(item);
|
||||
// 解析上一步中的html
|
||||
const html = cheerio.load(item);
|
||||
|
||||
const title = html('td[width="620"] a').attr('title');
|
||||
const link = html('td[width="620"] a').attr('href');
|
||||
const date = timezone(parseDate(html('td[width="100"]').text()), +8);
|
||||
return {
|
||||
title,
|
||||
description: title,
|
||||
pubDate: date,
|
||||
link,
|
||||
author: '济南市卫生健康委员会',
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
const title = html('td[width="620"] a').attr('title');
|
||||
const link = html('td[width="620"] a').attr('href');
|
||||
const date = timezone(parseDate(html('td[width="100"]').text()), +8);
|
||||
return {
|
||||
title,
|
||||
description: title,
|
||||
pubDate: date,
|
||||
link,
|
||||
author: '济南市卫生健康委员会',
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user