fix(handler): do not ignore main link in Eurostreaming
This commit is contained in:
parent
1447adad1b
commit
f4a0b03246
2 changed files with 19 additions and 8 deletions
|
|
@ -37,14 +37,17 @@ export class Eurostreaming implements Handler {
|
|||
|
||||
const $ = cheerio.load(html);
|
||||
|
||||
return Promise.all(
|
||||
$(`[data-num="${imdbId.series}x${imdbId.episode}"]`)
|
||||
.siblings('.mirrors')
|
||||
.children('[data-link!="#"]')
|
||||
.map((_i, el) => new URL(($(el).attr('data-link') as string).replace(/^(https:)?\/\//, 'https://')))
|
||||
.toArray()
|
||||
.filter(url => !url.host.match(/eurostreaming/))
|
||||
.map(url => this.extractorRegistry.handle(ctx, url, 'it')),
|
||||
const mainDataLinkElements = $(`[data-num="${imdbId.series}x${imdbId.episode}"][data-link!="#"]`);
|
||||
const mirrorDataLinkElements = $(`[data-num="${imdbId.series}x${imdbId.episode}"]`)
|
||||
.siblings('.mirrors')
|
||||
.children('[data-link!="#"]');
|
||||
|
||||
return Promise.all(mainDataLinkElements
|
||||
.add(mirrorDataLinkElements)
|
||||
.map((_i, el) => new URL(($(el).attr('data-link') as string).replace(/^(https:)?\/\//, 'https://')))
|
||||
.toArray()
|
||||
.filter(url => !url.host.match(/eurostreaming/))
|
||||
.map(url => this.extractorRegistry.handle(ctx, url, 'it')),
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ exports[`Eurostreaming handle imdb black mirror s2e4 1`] = `
|
|||
"sourceId": "supervideo_it",
|
||||
"url": "https://hfs309.serversicuro.cc/hls/dnzpdeoe5xg4a3gyvaqx5ojpswtxjd5a22rklgah7,khdhascykjrixs7huqq,obtfascykj3vna7rk5a,.urlset/master.m3u8",
|
||||
},
|
||||
{
|
||||
"bytes": 875875532,
|
||||
"countryCode": "it",
|
||||
"height": 1080,
|
||||
"label": "SuperVideo",
|
||||
"sourceId": "supervideo_it",
|
||||
"url": "https://hfs309.serversicuro.cc/hls/dnzpdeoe5xg4a3gyvaqx5ojpswtxjd5a22rklgah7,khdhascykjrixs7huqq,obtfascykj3vna7rk5a,.urlset/master.m3u8",
|
||||
},
|
||||
{
|
||||
"bytes": 875875532,
|
||||
"countryCode": "it",
|
||||
|
|
|
|||
Loading…
Reference in a new issue