fix(source): add support for old XDMovies uploads without URL protector

This commit is contained in:
WebStreamr 2026-02-23 11:14:53 +00:00
parent 556b20e669
commit 964e979469
No known key found for this signature in database
6 changed files with 222 additions and 0 deletions

View file

@ -25,4 +25,9 @@ describe('XDMovies', () => {
const streams = await source.handle(ctx, 'series', new TmdbId(66732, 5, 8));
expect(streams).toMatchSnapshot();
});
test('handle great indian kapil show s03e01', async () => {
const streams = await source.handle(ctx, 'series', new TmdbId(247769, 3, 1));
expect(streams).toMatchSnapshot();
});
});

View file

@ -110,6 +110,10 @@ export class XDMovies extends Source {
.map((_i, el) => new URL($(el).attr('href') as string))
.get(0) as URL;
if (!url.host.startsWith('link.')) {
return { url, meta };
}
const linkProtectorUrl = await this.fetcher.getFinalRedirectUrl(ctx, url, undefined, 1);
const code = linkProtectorUrl.pathname.split('/').pop() as string;

View file

@ -0,0 +1 @@
{"adult":false,"backdrop_path":"/w8L2oVjsSRZdZ1Wcszot9cKZMRO.jpg","created_by":[{"id":1513214,"credit_id":"65e071bba806730161a84c3a","name":"Kapil Sharma","original_name":"Kapil Sharma","gender":2,"profile_path":"/bu0jBQkDJmXCuISoJwktwgamkRX.jpg"}],"episode_run_time":[60],"first_air_date":"2024-03-30","genres":[{"id":10767,"name":"Talk"},{"id":35,"name":"Comedy"}],"homepage":"https://www.netflix.com/title/81737430","id":247769,"in_production":true,"languages":["hi"],"last_air_date":"2026-01-31","last_episode_to_air":{"id":6947233,"name":"Jab Bhidu Went Dhak Dhak","overview":"Their 90s roots bring love and charm wherever they go. Madhuri Dixit and Jackie Shroff take a walk down memory lane with Kapil.","vote_average":0.0,"vote_count":0,"air_date":"2026-02-21","episode_number":10,"episode_type":"standard","production_code":"","runtime":65,"season_number":4,"show_id":247769,"still_path":null},"name":"The Great Indian Kapil Show","next_episode_to_air":{"id":6970721,"name":"Episode 11","overview":"","vote_average":0.0,"vote_count":0,"air_date":"2026-02-28","episode_number":11,"episode_type":"standard","production_code":"","runtime":null,"season_number":4,"show_id":247769,"still_path":null},"networks":[{"id":213,"logo_path":"/wwemzKWzjKYJFfCeiB57q3r4Bcm.png","name":"Netflix","origin_country":""}],"number_of_episodes":48,"number_of_seasons":4,"origin_country":["IN"],"original_language":"hi","original_name":"द ग्रेट इंडियन कपिल शो","overview":"Comedian Kapil Sharma hosts this laugh-out-loud variety talk show with celebrity guests, hilarious antics and his signature supporting cast.","popularity":8.8458,"poster_path":"/3KMCmGDlYLlJ8zGOhCs6f3FZcnj.jpg","production_companies":[{"id":174244,"logo_path":null,"name":"K9 Films Production","origin_country":""},{"id":227389,"logo_path":null,"name":"Beingu Studios","origin_country":""}],"production_countries":[{"iso_3166_1":"IN","name":"India"}],"seasons":[{"air_date":"2024-03-30","episode_count":13,"id":381542,"name":"Season 1","overview":"Comedian Kapil Sharma hosts this laugh-out-loud variety talk show with celebrity guests, hilarious antics and his signature supporting cast.","poster_path":"/lSR8Pn996v5Xfr3SpgO2sRhwamk.jpg","season_number":1,"vote_average":6.9},{"air_date":"2024-09-21","episode_count":13,"id":417968,"name":"Season 2","overview":"Comedian Kapil Sharma brings desi fun to an all-new season featuring celebrity guests, side-splitting gags and a dash of classic Indian charm.","poster_path":"/2yFoz0EHXMlDIqDm6wo6XHv2wiY.jpg","season_number":2,"vote_average":7.8},{"air_date":"2025-06-21","episode_count":14,"id":457951,"name":"Season 3","overview":"Season 3 of The Great Indian Kapil Show brings back Indias most loved comedy talk show with a grander scale, sharper humor, and an even wider range of celebrity guests. Hosted by Kapil Sharma, the season once again combines laugh-out-loud sketches, candid celebrity interviews, and musical performances, making it a wholesome entertainer for audiences of all ages.\n\nThis season, Kapil is joined by his trusted ensemble including Sunil Grover, Krushna Abhishek, Kiku Sharda, and Archana Puran Singh, who deliver hilarious skits rooted in relatable everyday situations. The season also experiments with business-themed specials, film promotions, and personal storytelling that offer a refreshing mix of comedy and insight.","poster_path":"/iaQFw0MVltVqnIVSTkLuArX4Kim.jpg","season_number":3,"vote_average":8.2},{"air_date":"2025-12-20","episode_count":11,"id":487908,"name":"Season 4","overview":"","poster_path":"/zDcZG6bCf6crscEnEF19MMNIi9j.jpg","season_number":4,"vote_average":6.4}],"spoken_languages":[{"english_name":"Hindi","iso_639_1":"hi","name":"हिन्दी"}],"status":"Returning Series","tagline":"","type":"Talk Show","vote_average":7.769,"vote_count":13}

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,58 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`XDMovies handle great indian kapil show s03e01 1`] = `
[
{
"meta": {
"bytes": 1320702443,
"countryCodes": [
"multi",
"hi",
],
"height": 1080,
"title": "The.Great.Indian.Kapil.Show.S03E01.1080p.NF.WEB-DL.DDP5.1.AV1-PrimeFix.mkv",
},
"url": "https://hubcloud.one/drive/3uuwzq1q3pye9yv",
},
{
"meta": {
"bytes": 3103113871,
"countryCodes": [
"multi",
"hi",
],
"height": 1080,
"title": "The.Great.Indian.Kapil.Show.S03E01.1080p.NF.WEB-DL.DDP5.1.H.264-PrimeFix.mkv",
},
"url": "https://hubcloud.one/drive/lpuxelnsleaec6y",
},
{
"meta": {
"bytes": 450971566,
"countryCodes": [
"multi",
"hi",
],
"height": 720,
"title": "The.Great.Indian.Kapil.Show.S03E01.720p.NF.WEB-DL.DDP5.1.AV1-PrimeFix.mkv",
},
"url": "https://hubcloud.one/drive/2114yktggdye42a",
},
{
"meta": {
"bytes": 1868310773,
"countryCodes": [
"multi",
"hi",
],
"height": 720,
"title": "The.Great.Indian.Kapil.Show.S03E01.720p.NF.WEB-DL.DDP5.1.H.264-PrimeFix.mkv",
},
"url": "https://hubcloud.one/drive/cgghjzjgjbqxgmi",
},
]
`;
exports[`XDMovies handle non-existent devil's bath 2024 gracefully 1`] = `[]`;
exports[`XDMovies handle rathnam 2024 1`] = `