fix: 每日安全结构变动 (#2638)

This commit is contained in:
Chenyang Shi 2019-07-18 01:14:49 +08:00 committed by DIYgod
parent 86852af78b
commit 29da912b9e
1 changed files with 2 additions and 3 deletions

View File

@ -9,15 +9,14 @@ module.exports = async (ctx) => {
const response = await got.get(link);
const $ = cheerio.load(response.data);
const out = $('div.endless_page_template div.row')
const out = $('div.endless_page_template div.card')
.slice(0, 10)
.map(function() {
const author = $(this)
.find('div.card-text small.text-muted')
.find('div.card-body small.text-muted')
.text()
.trim()
.split('•')[0];
const itemUrl = $(this)
.find('h5.card-title > a')
.attr('href');