Merge pull request #75 from movie-web/vidsrc-decoding-fix

VidSrc: Remove equal signs inside base64 encoded string
This commit is contained in:
William Oldham 2024-01-20 16:45:52 +00:00 committed by GitHub
commit 2834b1eff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,10 +15,7 @@ export const vidsrcembedScraper = makeEmbed({
},
});
const match = html
.match(hlsURLRegex)?.[1]
?.replace(/(\/\/\S+?=)/g, '')
.replace('#2', '');
const match = html.match(hlsURLRegex)?.[1]?.replace(/(\/\/\S+?=)|#2|=/g, '');
if (!match) throw new Error('Unable to find HLS playlist');
const finalUrl = atob(match);