feat(xiaohongshu): update guid generation for user feeds and notes (#19302)
This commit is contained in:
@@ -98,7 +98,7 @@ async function getUserFeeds(url: string, category: string) {
|
||||
n.map(({ id, noteCard }) => ({
|
||||
title: noteCard.displayTitle,
|
||||
link: new URL(noteCard.noteId || id, url).toString(),
|
||||
guid: noteCard.noteId || id || noteCard.displayTitle,
|
||||
guid: new URL(noteCard.noteId || id, url).toString() || noteCard.displayTitle,
|
||||
description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`,
|
||||
author: noteCard.user.nickname,
|
||||
upvotes: noteCard.interactInfo.likedCount,
|
||||
|
||||
@@ -131,13 +131,14 @@ async function renderNotesFulltext(notes, urlPrex, displayLivePhoto) {
|
||||
const promises = notes.flatMap((note) =>
|
||||
note.map(async ({ noteCard, id }) => {
|
||||
const link = `${urlPrex}/${id}`;
|
||||
const guid = `${urlPrex}/${noteCard.noteId}`;
|
||||
const { title, description, pubDate, updated } = await getFullNote(link, displayLivePhoto);
|
||||
return {
|
||||
title,
|
||||
link,
|
||||
description,
|
||||
author: noteCard.user.nickName,
|
||||
guid: noteCard.noteId,
|
||||
guid,
|
||||
pubDate,
|
||||
updated,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user