mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复netease解析的部分问题
This commit is contained in:
parent
03ee875a79
commit
24bb343e59
@ -247,7 +247,7 @@ export class neteasepro extends plugin {
|
||||
// 非小程序
|
||||
const title = await getSongDetail(id).then(res => {
|
||||
const song = res.songs?.[0];
|
||||
return song.length > 0
|
||||
return song?.length > 0
|
||||
? `${song?.name}-${song?.ar?.[0].name}`.replace(/[\/\?<>\\:\*\|".… ]/g, "")
|
||||
: "暂无信息";
|
||||
});
|
||||
|
@ -793,7 +793,7 @@ export class tools extends plugin {
|
||||
|
||||
// 小红书解析
|
||||
async redbook(e) {
|
||||
// 解析短号
|
||||
// 正则说明:匹配手机链接、匹配小程序、匹配PC链接
|
||||
let msgUrl =
|
||||
/(http:|https:)\/\/(xhslink|xiaohongshu).com\/[A-Za-z\d._?%&+\-=\/#@]*/.exec(
|
||||
e.msg,
|
||||
@ -804,6 +804,7 @@ export class tools extends plugin {
|
||||
|| /(http:|https:)\/\/www\.xiaohongshu\.com\/explore\/(\w+)/.exec(
|
||||
e.msg,
|
||||
)?.[0]
|
||||
// 解析短号
|
||||
let id;
|
||||
if (msgUrl.includes("xhslink")) {
|
||||
await fetch(msgUrl, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user