From 9d16edf68a8462b0d38eb04092998b45d87087f5 Mon Sep 17 00:00:00 2001 From: JerryYang-30 <102589310+JerryYang-30@users.noreply.github.com> Date: Sun, 30 Jun 2024 21:52:07 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E5=B0=8F=E7=BA=A2=E4=B9=A6=E7=9A=84us?= =?UTF-8?q?er.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 目前不登录无法获取小红书笔记链接,导致原方案会被Qi Reader判定为笔记重复,无法推送 --- src/lib/xiaohongshu/user.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/xiaohongshu/user.js b/src/lib/xiaohongshu/user.js index 438768e..9914008 100644 --- a/src/lib/xiaohongshu/user.js +++ b/src/lib/xiaohongshu/user.js @@ -47,6 +47,9 @@ let deal = async (ctx) => { notes.flatMap((n) => n.map(({ noteCard }) => ({ title: noteCard.displayTitle, + // 现在必须要登陆才能获取笔记链接,所以文章link都是{url}了(noteId为空)。 + // 而Qi Reader把文章链接当作文章Id(如果源里没有Id字段的话),所以所有文章共用一个链接就导致了新文章被判定重复。 + // link: `${url}/${noteCard.noteId}`, description: `
${noteCard.displayTitle}`, author: noteCard.user.nickname, upvotes: noteCard.interactInfo.likedCount, @@ -64,6 +67,7 @@ let deal = async (ctx) => { } return collect.data.notes.map((item) => ({ title: item.display_title, + link: `${url}/${item.note_id}`, description: `
${item.display_title}`, author: item.user.nickname, upvotes: item.interact_info.likedCount, @@ -76,6 +80,7 @@ let deal = async (ctx) => { title, description, image, + link: url, items: category === 'notes' ? renderNote(notes) : renderCollect(collect), }) );