From 9d4b52c10749e166401b44584f9f30621ca51359 Mon Sep 17 00:00:00 2001 From: bytedream Date: Thu, 16 Jun 2022 23:42:43 +0200 Subject: [PATCH] Add vidoza --- src/match/match.ts | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/match/match.ts b/src/match/match.ts index f8a7b28..5f20edf 100644 --- a/src/match/match.ts +++ b/src/match/match.ts @@ -145,25 +145,17 @@ class Vidlox implements Match { } } -class Vidstream implements Match { - name = 'Vidstream' - id = 'vidstream' - reliability = Reliability.LOW +class Vidoza implements Match { + name = 'Vidoza' + id = 'vidoza' + reliability = Reliability.HIGH domains = [ - 'vidstream.pro' + 'vidoza.net' ] - regex = new RegExp(/(?<=')\w+(?=';)/gm) + regex = new RegExp(/(?<=src:\s?").+?(?=")/gm) async match(match: RegExpMatchArray): Promise { - const code = window.location.pathname.split('/').slice(-1)[0] - const response = await fetch(`https://vidstream.pro/info/${code}?skey=${match[0]}`, { - headers: { - 'Content-Type': 'application/json' - }, - referrer: `https://vidstream.pro/embed/${code}` - }) - const json = await response.json() - return json['media']['sources'][0]['file'] + return match[0] } } @@ -232,6 +224,7 @@ export const matches = [ new Streamzz(), new Upstream(), new Vidlox(), + new Vidoza(), new Vivo(), new Voe(), new Vupload()