feat: update diygod animal-crossing
This commit is contained in:
parent
fd93be2498
commit
9710fde54e
|
|
@ -11,7 +11,7 @@ module.exports = async (ctx) => {
|
|||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('h3');
|
||||
const list = $('h2');
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'DIYgod 的动森日记',
|
||||
|
|
@ -22,7 +22,7 @@ module.exports = async (ctx) => {
|
|||
.map((index, item) => {
|
||||
item = $(item);
|
||||
let description = '';
|
||||
item.nextUntil('h3').each((index, item) => {
|
||||
item.nextUntil('h2').each((index, item) => {
|
||||
description += $(item).html();
|
||||
});
|
||||
return {
|
||||
|
|
@ -30,6 +30,7 @@ module.exports = async (ctx) => {
|
|||
description,
|
||||
link: `https://diygod.me/animal-crossing/#${item.attr('id')}`,
|
||||
pubDate: date(item.text().split(' ')[1]),
|
||||
guid: item.text().split(' ')[0],
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue