Skip to content

Commit

Permalink
Update user.js
Browse files Browse the repository at this point in the history
使用笔记封面作为guid
  • Loading branch information
JerryYang-30 authored Jun 30, 2024
1 parent 1542167 commit eb63796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/xiaohongshu/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ let deal = async (ctx) => {
const renderNote = (notes) =>
notes.flatMap((n) =>
n.map(({ noteCard }) => ({
// Qi Reader用Id判断文章是否重复
guid: `${noteCard.cover.infoList.pop().url}`, // 使用封面链接作为ID,
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,
// Qi Reader用Id判断文章是否重复
guid: `${noteCard.cover.infoList.pop().url}`, // 使用封面链接作为ID,
}))
);
const renderCollect = (collect) => {
Expand Down

0 comments on commit eb63796

Please sign in to comment.