fix(route): coolapk item type 13 (#12910)

This commit is contained in:
Tony
2023-07-29 23:47:03 +08:00
committed by GitHub
parent f466312a01
commit 9c33b3fb34
+3 -4
View File
@@ -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 = `<p>` + item.message + `</p>` + picArr.join('');
}
const $ = cheerio.load('<div class="title-filter">' + description + '</div>');
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'
// //////////////////////////////////////////// 基本内容结束 ////////////////////////////////////////////