feat(route/apnews): Enhance live page post extraction. (#17446)

This commit is contained in:
Andvari
2024-11-06 04:37:29 +08:00
committed by GitHub
parent cf7ce2470b
commit 66533f57e8
+6 -2
View File
@@ -51,10 +51,14 @@ export function fetchArticle(item) {
// Live
ldjson = rawLdjson;
const url = new URL(item.link);
const description = url.hash ? $(url.hash).parent().find('.LiveBlogPost-body').html() : ldjson.description;
const pubDate = url.hash ? parseDate(Number.parseInt($(url.hash).parent().attr('data-posted-date-timestamp'), 10)) : parseDate(ldjson.coverageStartTime);
return {
category: ldjson.keywords,
pubDate: parseDate(ldjson.coverageStartTime),
description: ldjson.description,
pubDate,
description,
guid: $("meta[name='brightspot.contentId']").attr('content'),
...item,
};