fix: japanpost guid (#3422)

This commit is contained in:
tuzi3040
2019-11-14 15:21:57 +08:00
committed by DIYgod
parent 156f26388f
commit b9d6383db6
+16 -2
View File
@@ -43,10 +43,24 @@ module.exports = async (ctx) => {
.map((index, item) => {
item = $(item);
const itemTd = item.find('td');
const itemTitle = itemTd.eq(1).text() + ' ' + itemTd.eq(4).text() + ' ' + itemTd.eq(3).text();
const itemTitle =
itemTd
.eq(1)
.text()
.trim() +
' ' +
itemTd
.eq(4)
.text()
.trim() +
' ' +
itemTd
.eq(3)
.text()
.trim();
const itemDescription = itemTd.eq(2).text();
const itemPubDateText = itemTd.eq(0).text();
const itemGuid = util.generateGuid(itemDescription + itemPubDateText);
const itemGuid = util.generateGuid(itemTitle + itemDescription + itemPubDateText);
return {
title: itemTitle,
description: itemDescription,