mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
🐞 fix: 修复 xhs 在 pc 端无法解析问题
This commit is contained in:
parent
cea93ed6c0
commit
5fc16d937f
@ -1356,7 +1356,8 @@ export class tools extends plugin {
|
||||
xsecToken = parsedUrl.searchParams.get("xsec_token");
|
||||
});
|
||||
} else {
|
||||
const parsedUrl = new URL(msgUrl);
|
||||
// 新版 xhs 这里必须是e.msg.trim(),因为要匹配参数:xsec_source 和 xsec_token
|
||||
const parsedUrl = new URL(e.msg.trim());
|
||||
id = /explore\/(\w+)/.exec(msgUrl)?.[1] || /discovery\/item\/(\w+)/.exec(msgUrl)?.[1];
|
||||
// 提取 xsec_source 和 xsec_token 参数
|
||||
xsecSource = parsedUrl.searchParams.get("xsec_source") ?? "pc_feed";
|
||||
|
Loading…
x
Reference in New Issue
Block a user