From 9c33b3fb34a56b7334772883767fe190b8632dec Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 29 Jul 2023 23:47:03 +0800 Subject: [PATCH] fix(route): coolapk item type 13 (#12910) --- lib/v2/coolapk/utils.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/v2/coolapk/utils.js b/lib/v2/coolapk/utils.js index fd4e26133..ac3ec3442 100644 --- a/lib/v2/coolapk/utils.js +++ b/lib/v2/coolapk/utils.js @@ -57,9 +57,7 @@ const parseTuwenFromRaw = (raw) => const parseDynamic = async (item, ctx) => { const pubDate = parseDate(item.lastupdate, 'X'); - if (item.entityType === 'sponsorCard') { - return; - } else if (item.shareUrl === undefined) { + if (item.entityType === 'sponsorCard' || item.shareUrl === undefined) { return; } const itemUrl = item.shareUrl.split('?')[0]; @@ -73,6 +71,7 @@ const parseDynamic = async (item, ctx) => { case 9: case 10: case 11: + case 13: // feedType: video (external) case 15: case 17: case 20: { @@ -92,7 +91,7 @@ const parseDynamic = async (item, ctx) => { description = `

` + item.message + `

` + picArr.join(''); } const $ = cheerio.load('
' + description + '
'); - title = $('.title-filter').text().slice(0, 30).trim() + '...'; + title = $('.title-filter').text().trim(); // no need to perform substring because it's will be handled by RSSHub 'TITLE_LENGTH_LIMIT' // //////////////////////////////////////////// 基本内容结束 ////////////////////////////////////////////