diff --git a/lib/routes/japanpost/index.js b/lib/routes/japanpost/index.js index 78070b6e14..eb4014909e 100644 --- a/lib/routes/japanpost/index.js +++ b/lib/routes/japanpost/index.js @@ -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,