Added mcloud.to

This commit is contained in:
bytedream 2021-10-22 23:40:21 +02:00
parent 6583b0c15c
commit 2e13586ebb
2 changed files with 16 additions and 0 deletions

View File

@ -1,4 +1,5 @@
evoload.io
mcloud.to
mixdrop.co
streamtape.com
streamzz.to

View File

@ -18,6 +18,20 @@ class Evoload implements Match {
}
}
class MCloud implements Match {
async match(match: RegExpMatchArray): Promise<string> {
const code = window.location.pathname.split('/').slice(-1)[0]
const response = await fetch(`https://mcloud.to/info/${code}?skey=${match[0]}`, {
headers: {
'Content-Type': 'application/json'
},
referrer: `https://mcloud.to/embed/${code}`
})
const json = await response.json()
return json['media']['sources'][0]['file']
}
}
class Mixdrop implements Match {
async match(match: RegExpMatchArray): Promise<string> {
return `https://a-${match[1]}.${match[4]}.${match[5]}/v/${match[2]}.${match[6]}?s=${match[12]}&e=${match[13]}`
@ -65,6 +79,7 @@ class Vupload implements Match {
// every match HAS to be on an separate line
const matches = [
['evoload.io', null, new Evoload()],
['mcloud.to', new RegExp(/(?<=')\w+(?=';)/gm), new MCloud()],
['mixdrop.co', new RegExp(/(?<=\|)\w{2,}/gm), new Mixdrop()],
['streamtape.com', new RegExp(/id=\S*(?=')/gm), new Streamtape()],
['streamzz.to', new RegExp(/https?:\/\/get.streamz.tw\/getlink-\w+\.dll/gm), null],