mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
api/xiaohongshu: update initial state extraction regex
Co-authored-by: jj <log@riseup.net>
This commit is contained in:
parent
de5eca19a5
commit
3cbed87c3e
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ export default async function ({ id, token, shareId, h265, isAudioOnly, dispatch
|
||||||
const initialState = html
|
const initialState = html
|
||||||
.split('<script>window.__INITIAL_STATE__=')[1]
|
.split('<script>window.__INITIAL_STATE__=')[1]
|
||||||
.split('</script>')[0]
|
.split('</script>')[0]
|
||||||
.replace(/:undefined/g, ":null");
|
.replace(/:\s*undefined/g, ":null");
|
||||||
|
|
||||||
const data = JSON.parse(initialState);
|
const data = JSON.parse(initialState);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue