mirror of
https://github.com/sussy-code/providers.git
synced 2026-04-22 09:01:59 +00:00
fix vidsrc
This commit is contained in:
parent
2661e24908
commit
fa8e3fa7e1
2 changed files with 19 additions and 13 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||
"eslint.format.enable": true
|
||||
"eslint.format.enable": true,
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,10 @@ export const vidsrcembedScraper = makeEmbed({
|
|||
if (!finalUrl.includes('.m3u8')) throw new Error('Unable to find HLS playlist');
|
||||
|
||||
let setPassLink = html.match(setPassRegex)?.[1];
|
||||
if (!setPassLink) throw new Error('Unable to find set_pass.php link');
|
||||
|
||||
// isn't neeeded, the stream works without it anyway
|
||||
// shouldn't fail if the setpass link is not found
|
||||
if (setPassLink) {
|
||||
if (setPassLink.startsWith('//')) {
|
||||
setPassLink = `https:${setPassLink}`;
|
||||
}
|
||||
|
|
@ -46,6 +48,7 @@ export const vidsrcembedScraper = makeEmbed({
|
|||
referer: ctx.url,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
stream: [
|
||||
|
|
|
|||
Loading…
Reference in a new issue