Skip to content

Commit

Permalink
fix(xiaohongshu): guid
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Sep 9, 2024
1 parent 64e00e7 commit 5cf7400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/routes/xiaohongshu/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ async function handler(ctx) {
n.map(({ id, noteCard }) => ({
title: noteCard.displayTitle,
link: `${url}/${noteCard.noteId || id}`,
guid: noteCard.noteId || id || noteCard.cover?.infoList?.[0]?.url || noteCard.displayTitle,
description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`,
author: noteCard.user.nickname,
upvotes: noteCard.interactInfo.likedCount,
Expand Down
4 changes: 3 additions & 1 deletion lib/routes/xiaohongshu/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const getUser = (url, cache) =>
cache.tryGet(
url,
async () => {
const browser = await puppeteer();
const browser = await puppeteer({
stealth: true,
});
try {
const page = await browser.newPage();
await page.setRequestInterception(true);
Expand Down

0 comments on commit 5cf7400

Please sign in to comment.