fix(route): 什么值得买关键词时间解析 (#11137)

什么值得买关键词搜索中时间格式有'HH:mm'和'MM-DD HH:mm',原先只能解析前者,后者会被把日期解析为时间。本次提交修复了该问题。
This commit is contained in:
Mean
2022-10-23 16:52:30 +06:00
committed by GitHub
parent 2c6318d176
commit 1161fb4dc0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = async (ctx) => {
return {
title: `${item.find('.feed-block-title a').eq(0).text().trim()} - ${item.find('.feed-block-title a').eq(1).text().trim()}`,
description: `${item.find('.feed-block-descripe').contents().eq(2).text().trim()}<br>${item.find('.feed-block-extras span').text().trim()}<br><img src="http:${item.find('.z-feed-img img').attr('src')}">`,
pubDate: timezone(parseDate(item.find('.feed-block-extras').contents().eq(0).text().trim(), 'HH:mm'), +8),
pubDate: timezone(parseDate(item.find('.feed-block-extras').contents().eq(0).text().trim(), ['MM-DD HH:mm', 'HH:mm']), +8),
link: item.find('.feed-block-title a').attr('href'),
};
}),
+1 -1
View File
@@ -3,6 +3,6 @@ module.exports = {
'/baoliao/:uid': ['nczitzk'],
'/haowen/:day?': ['LogicJake'],
'/haowen/fenlei/:name/:sort?': ['LogicJake'],
'/keyword/:keyword': ['DIYgod'],
'/keyword/:keyword': ['DIYgod', 'MeanZhang'],
'/ranking/:rank_type/:rank_id/:hour': ['DIYgod'],
};