mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-05-09 20:25:14 +02:00
Use more reliable streamtape match function
This commit is contained in:
parent
6e7410b088
commit
1fb85313dd
@ -156,11 +156,19 @@ export const Newgrounds: Match = {
|
||||
export const Streamtape: Match = {
|
||||
name: 'Streamtape',
|
||||
id: 'streamtape',
|
||||
reliability: Reliability.NORMAL,
|
||||
reliability: Reliability.HIGH,
|
||||
domains: ['streamtape.com', 'streamtape.net', 'shavetape.cash'],
|
||||
regex: /id=.*(?=')/gm,
|
||||
|
||||
match: async (match: RegExpMatchArray) => {
|
||||
let i = 0;
|
||||
while (i < match.length) {
|
||||
if (match[++i - 1] == match[i]) {
|
||||
return `https://streamtape.com/get_video?${match[i]}`;
|
||||
}
|
||||
}
|
||||
|
||||
// use the old method as fallback
|
||||
return `https://streamtape.com/get_video?${match.reverse()[0]}`;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user