Skip to content

Commit

Permalink
Update 小红书的user.js
Browse files Browse the repository at this point in the history
目前不登录无法获取小红书笔记链接,导致原方案会被Qi Reader判定为笔记重复,无法推送
  • Loading branch information
JerryYang-30 authored Jun 30, 2024
1 parent df0f9b8 commit 9d16edf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/xiaohongshu/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`,
author: noteCard.user.nickname,
upvotes: noteCard.interactInfo.likedCount,
Expand All @@ -64,6 +67,7 @@ let deal = async (ctx) => {
}
return collect.data.notes.map((item) => ({
title: item.display_title,
link: `${url}/${item.note_id}`,
description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`,
author: item.user.nickname,
upvotes: item.interact_info.likedCount,
Expand All @@ -76,6 +80,7 @@ let deal = async (ctx) => {
title,
description,
image,
link: url,
items: category === 'notes' ? renderNote(notes) : renderCollect(collect),
})
);
Expand Down

0 comments on commit 9d16edf

Please sign in to comment.