feat: 外汇牌价的description 放进title (#2118)

This commit is contained in:
Chenyang Shi
2019-05-13 16:29:19 +08:00
committed by DIYgod
parent 5da6295fb4
commit 6e3753012c
+13 -12
View File
@@ -17,19 +17,20 @@ module.exports = async (ctx) => {
.text()} ${$(this)
.find('td:nth-child(8)')
.text()}`;
const content = `现汇买入价:${$(this)
.find('td:nth-child(2)')
.text()} 现钞买入价:${$(this)
.find('td:nth-child(3)')
.text()} 现汇卖出价:${$(this)
.find('td:nth-child(4)')
.text()} 现钞卖出价:${$(this)
.find('td:nth-child(5)')
.text()} 中行折算价:${$(this)
.find('td:nth-child(6)')
.text()}`;
const info = {
title: name,
description: `现汇买入价:${$(this)
.find('td:nth-child(2)')
.text()}<br>现钞买入价:${$(this)
.find('td:nth-child(3)')
.text()}<br>现汇卖出价:${$(this)
.find('td:nth-child(4)')
.text()}<br>现钞卖出价:${$(this)
.find('td:nth-child(5)')
.text()}<br>中行折算价:${$(this)
.find('td:nth-child(6)')
.text()}<br>`,
title: name + ' ' + content,
description: content.replace(/\s/g, '<br>'),
pubDate: new Date(date).toUTCString(),
guid: name + date,
};