mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-02-04 13:26:27 +01:00
update
This commit is contained in:
26
src/lib/host/streamtape.ts
Normal file
26
src/lib/host/streamtape.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { HostMatchType, type Host } from '@/lib/host';
|
||||
|
||||
export default {
|
||||
name: 'Streamtape',
|
||||
id: 'streamtape',
|
||||
domains: ['streamtape.com', 'streamtape.net', 'shavetape.cash'],
|
||||
regex: [/id=.*(?=')/gm],
|
||||
|
||||
match: async function (match: RegExpMatchArray) {
|
||||
let i = 0;
|
||||
while (i < match.length) {
|
||||
if (match[++i - 1] == match[i]) {
|
||||
return {
|
||||
type: HostMatchType.HLS,
|
||||
url: `https://streamtape.com/get_video?${match[i]}`
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
type: HostMatchType.HLS,
|
||||
// use the old method as fallback
|
||||
url: `https://streamtape.com/get_video?${match.reverse()[0]}`
|
||||
};
|
||||
}
|
||||
} satisfies Host;
|
||||
Reference in New Issue
Block a user