Skip to content

Commit

Permalink
Update user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryYang-30 authored Jun 30, 2024
1 parent d070ac0 commit cae2013
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/xiaohongshu/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ let deal = async (ctx) => {
const renderNote = (notes) =>
notes.flatMap((n) =>
n.map(({ noteCard }) => ({
// Qi Reader用Id判断文章是否重复
Id: `${noteCard.cover.infoList.pop().url}`,
title: noteCard.displayTitle,
// 现在必须要登陆才能获取笔记链接,所以文章link都是{url}了(noteId为空)。
// 而Qi Reader把文章链接当作文章Id(如果源里没有Id字段的话),所以所有文章共用一个链接就导致了新文章被判定重复。
link: `${url}/${noteCard.noteId}`,
id: `${noteCard.cover.infoList.pop().url}`,
description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`,
author: noteCard.user.nickname,
upvotes: noteCard.interactInfo.likedCount,
Expand Down

0 comments on commit cae2013

Please sign in to comment.