mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: V1.5.8 [!6] 适配米游社小程序
Merge pull request !6 from liangho-ng/master
This commit is contained in:
commit
c528634c39
@ -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