mirror of
https://github.com/bytedream/stream-bypass.git
synced 2026-02-04 05:16:27 +01:00
27 lines
620 B
TypeScript
27 lines
620 B
TypeScript
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;
|