refactor: optimize code

This commit is contained in:
DIYgod 2019-11-22 18:34:09 +08:00
parent d4846e52e5
commit 4d3e12a13c
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
2 changed files with 1 additions and 4 deletions

View File

@ -39,9 +39,6 @@ module.exports = async (ctx) => {
try {
const response = await got.get(link);
const result = utils.parseContent(response.data);
if (!result) {
return Promise.resolve('');
}
rssitem.author = result.author;
rssitem.description = result.description;

View File

@ -26,7 +26,7 @@ module.exports = async (ctx) => {
item = $(item);
return {
title: item.find('a').text(),
description: item.find('p').text() + ' [...]' || '重科教务处',
description: item.find('p').text() + ' [...]',
pubDate: new Date(
item
.find('.shijian')