mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -16,7 +16,12 @@ module.exports = async (ctx) => {
|
||||
const promises = days.map(async (ele) => {
|
||||
ele = $(ele);
|
||||
const relativePath = ele.attr('href');
|
||||
const innerText = ele.text();
|
||||
const innerText = ele
|
||||
.text()
|
||||
.replace(/\s+/g, '')
|
||||
.replace(/年/g, '-')
|
||||
.replace(/月/g, '-')
|
||||
.replace(/日/g, '');
|
||||
const link = url.resolve(indexLink, relativePath);
|
||||
const cache = await ctx.cache.get(link);
|
||||
if (cache) {
|
||||
@@ -37,7 +42,7 @@ module.exports = async (ctx) => {
|
||||
allowedTags: ['div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'li', 'p', 'span', 'a', 'blockquote'],
|
||||
});
|
||||
const item = {
|
||||
title: $('head>title').text(),
|
||||
title: ele.text() + ' | D2 日报',
|
||||
pubDate: new Date(innerText.trim()).toUTCString(),
|
||||
description,
|
||||
guid: link,
|
||||
|
||||
Reference in New Issue
Block a user