mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-06-27 18:40:31 +02:00
Added 7 new sites and general refactoring
This commit is contained in:
43
src/match.ts
43
src/match.ts
@ -1,15 +1,43 @@
|
||||
interface Match {
|
||||
match(match: RegExpMatchArray): string
|
||||
match(match: RegExpMatchArray): Promise<string>
|
||||
}
|
||||
|
||||
class Evoload implements Match {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
const code = window.location.pathname.split('/').slice(-1)[0]
|
||||
const response = await fetch('https://evoload.io/SecurePlayer', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({code: code})
|
||||
})
|
||||
|
||||
const json = await response.json()
|
||||
return json['stream']['src']
|
||||
}
|
||||
}
|
||||
|
||||
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]}`
|
||||
}
|
||||
}
|
||||
|
||||
class Streamtape implements Match {
|
||||
match(match: RegExpMatchArray): string {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
return `https://streamtape.com/get_video?${match[0]}`
|
||||
}
|
||||
}
|
||||
|
||||
class TheVideoMe implements Match {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
return `https://thevideome.com/${match[5]}.mp4`
|
||||
}
|
||||
}
|
||||
|
||||
class Vivo implements Match {
|
||||
match(match: RegExpMatchArray): string {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
return this.rot47(decodeURIComponent(match[1]))
|
||||
}
|
||||
|
||||
@ -29,15 +57,22 @@ class Vivo implements Match {
|
||||
}
|
||||
|
||||
class Vupload implements Match {
|
||||
match(match: RegExpMatchArray): string {
|
||||
async match(match: RegExpMatchArray): Promise<string> {
|
||||
return `https://www3.megaupload.to/${match[0]}/v.mp4`
|
||||
}
|
||||
}
|
||||
|
||||
// every match HAS to be on an separate line
|
||||
const matches = [
|
||||
['evoload.io', null, new Evoload()],
|
||||
['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],
|
||||
['thevideome.com', new RegExp(/(?<=\|)\w{2,}/gm), new TheVideoMe()],
|
||||
['vidlox.me', new RegExp(/(?<=\[")\S+?(?=")/gm), null],
|
||||
['vidoza.net', new RegExp(/(?<=src:(\s*)?")\S*(?=")/gm), null],
|
||||
['vivo.st', new RegExp(/source:\s*'(\S+)'/gm), new Vivo()],
|
||||
['vivo.sx', new RegExp(/source:\s*'(\S+)'/gm), new Vivo()],
|
||||
['voe.sx', new RegExp(/https?:\/\/\S*m3u8(?=")/gm), null],
|
||||
['vupload.com', new RegExp(/(?<=class\|)\w*/gm), new Vupload()]
|
||||
]
|
||||
|
Reference in New Issue
Block a user