Skip to content

Commit

Permalink
fix(route/xiaohongshu) add cookie authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
dddaniel1 committed Oct 21, 2024
1 parent 68093b7 commit 785ab3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/xiaohongshu/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async function handler(ctx) {
}

async function renderNotesFulltext(notes, urlPrex) {
const data: any[] = [];
const data = [];
const promises = notes.flatMap((note) =>
note.map(async ({ noteCard, id }) => {
const link = `${urlPrex}/${id}`;
Expand All @@ -93,7 +93,7 @@ async function getFullNote(link) {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
Cookie: cookie,
} as any,
},
});
const $ = load(res.data);
let script = $('script')
Expand Down

0 comments on commit 785ab3f

Please sign in to comment.