Skip to content

Commit

Permalink
api/xiaohongshu: update initial state extraction regex
Browse files Browse the repository at this point in the history
Co-authored-by: jj <[email protected]>
  • Loading branch information
wukko and dumbmoron authored Jan 20, 2025
1 parent de5eca1 commit 3cbed87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/processing/services/xiaohongshu.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default async function ({ id, token, shareId, h265, isAudioOnly, dispatch
const initialState = html
.split('<script>window.__INITIAL_STATE__=')[1]
.split('</script>')[0]
.replace(/:undefined/g, ":null");
.replace(/:\s*undefined/g, ":null");

const data = JSON.parse(initialState);

Expand Down

0 comments on commit 3cbed87

Please sign in to comment.