Update Kokoshka.ts
There are some old dodo domains like d-s.io which fail to load the stream, so instead after fetching the link I replaced it with working domain like dsvplay.com
This commit is contained in:
parent
bab7c80361
commit
e126970047
1 changed files with 19 additions and 7 deletions
|
|
@ -79,9 +79,15 @@ export class Kokoshka extends Source {
|
|||
if (json.embed_url) urls.push(json.embed_url);
|
||||
if (Array.isArray(json.sources)) urls.push(...json.sources.map((s: any) => s.file));
|
||||
|
||||
for (const embed of urls) {
|
||||
const cleaned = embed.replace(/\\/g, '').replace(/^http:/, 'https:');
|
||||
const url = new URL(cleaned);
|
||||
for (let embed of urls) {
|
||||
embed = embed.replace(/\\/g, '').replace(/^http:/, 'https:');
|
||||
|
||||
// --- Replace Dodo domain ---
|
||||
if (embed.startsWith('https://d-s.io/')) {
|
||||
embed = embed.replace('https://d-s.io/e/', 'https://dsvplay.com/e/');
|
||||
}
|
||||
|
||||
const url = new URL(embed);
|
||||
if (await testUrl(url)) {
|
||||
results.push({
|
||||
url,
|
||||
|
|
@ -111,9 +117,15 @@ export class Kokoshka extends Source {
|
|||
if (json.embed_url) urls.push(json.embed_url);
|
||||
if (Array.isArray(json.sources)) urls.push(...json.sources.map((s: any) => s.file));
|
||||
|
||||
for (const embed of urls) {
|
||||
const cleaned = embed.replace(/\\/g, '').replace(/^http:/, 'https:');
|
||||
const url = new URL(cleaned);
|
||||
for (let embed of urls) {
|
||||
embed = embed.replace(/\\/g, '').replace(/^http:/, 'https:');
|
||||
|
||||
// --- Replace Dodo domain ---
|
||||
if (embed.startsWith('https://d-s.io/')) {
|
||||
embed = embed.replace('https://d-s.io/e/', 'https://dsvplay.com/e/');
|
||||
}
|
||||
|
||||
const url = new URL(embed);
|
||||
if (await testUrl(url)) {
|
||||
results.push({
|
||||
url,
|
||||
|
|
@ -133,4 +145,4 @@ export class Kokoshka extends Source {
|
|||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue