mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-12-06 02:11:56 +00:00
适配米游社小程序
This commit is contained in:
parent
698a64e179
commit
6b631d8455
@ -1126,7 +1126,8 @@ export class tools extends plugin {
|
|||||||
|
|
||||||
// 米游社
|
// 米游社
|
||||||
async miyoushe(e) {
|
async miyoushe(e) {
|
||||||
let msg = /(?:https?:\/\/)?(m|www)\.miyoushe\.com\/[A-Za-z\d._?%&+\-=\/#]*/.exec(e.msg)[0];
|
let url = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim();
|
||||||
|
let msg = /(?:https?:\/\/)?(m|www)\.miyoushe\.com\/[A-Za-z\d._?%&+\-=\/#]*/.exec(url)?.[0];
|
||||||
const id = /\/(\d+)$/.exec(msg)?.[0].replace("\/", "");
|
const id = /\/(\d+)$/.exec(msg)?.[0].replace("\/", "");
|
||||||
|
|
||||||
fetch(MIYOUSHE_ARTICLE.replace("{}", id), {
|
fetch(MIYOUSHE_ARTICLE.replace("{}", id), {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user