diff --git a/dist/providers/anime/anix.d.ts b/dist/providers/anime/anix.d.ts index 662b06708..da468ac4d 100644 --- a/dist/providers/anime/anix.d.ts +++ b/dist/providers/anime/anix.d.ts @@ -28,13 +28,25 @@ declare class Anix extends AnimeParser { * @param id Anime id * @param episodeId Episode id * @param server Streaming server(optional) + * @param type Type (optional) (options: `sub`, `dub`, `raw`) */ - fetchEpisodeSources: (id: string, episodeId: string, server?: StreamingServers) => Promise; + fetchEpisodeSources: (id: string, episodeId: string, server?: StreamingServers, type?: string) => Promise; /** * * @param id Anime id * @param episodeId Episode id */ fetchEpisodeServers: (id: string, episodeId: string) => Promise; + /** + * + * @param id Anime id + * @param episodeId Episode id + * @param type Type (optional) (options: `sub`, `dub`, `raw`) + */ + fetchEpisodeServerType: (id: string, episodeId: string, type?: string) => Promise<{ + sub: IEpisodeServer[]; + dub: IEpisodeServer[]; + raw: IEpisodeServer[]; + } | IEpisodeServer[]>; } export default Anix; diff --git a/dist/providers/anime/anix.js b/dist/providers/anime/anix.js index 067c3159b..0bd518c10 100644 --- a/dist/providers/anime/anix.js +++ b/dist/providers/anime/anix.js @@ -21,6 +21,8 @@ class Anix extends models_1.AnimeParser { this.MediaRegion = { ANIME: 'country[]=1&country[]=2&country[]=3&country[]=4&country[]=6', DONGHUA: 'country[]=5', + SUB: 'language[]=sub', + DUB: 'language[]=dub', }; this.defaultSort = `&type[]=${this.MediaCategory.MOVIE}&type[]=${this.MediaCategory.TV}&type[]=${this.MediaCategory.ONA}&type[]=${this.MediaCategory.OVA}&type[]=${this.MediaCategory.SPECIAL}&type[]=${this.MediaCategory.TV_SPECIAL}&status[]=${models_1.MediaStatus.ONGOING}&status[]=${models_1.MediaStatus.COMPLETED}`; this.requestedWith = 'XMLHttpRequest'; @@ -36,6 +38,12 @@ class Anix extends models_1.AnimeParser { else if (type == 2) { url += `&${this.MediaRegion.DONGHUA}`; } + else if (type == 3) { + url += `&${this.MediaRegion.SUB}`; + } + else if (type == 4) { + url += `&${this.MediaRegion.DUB}`; + } const res = await this.client.get(url); const $ = (0, cheerio_1.load)(res.data); const recentEpisodes = []; @@ -260,8 +268,9 @@ class Anix extends models_1.AnimeParser { * @param id Anime id * @param episodeId Episode id * @param server Streaming server(optional) + * @param type Type (optional) (options: `sub`, `dub`, `raw`) */ - this.fetchEpisodeSources = async (id, episodeId, server = models_1.StreamingServers.BuiltIn) => { + this.fetchEpisodeSources = async (id, episodeId, server = models_1.StreamingServers.BuiltIn, type = '') => { const url = `${this.baseUrl}/anime/${id}/${episodeId}`; const uri = new URL(url); const res = await this.client.get(url); @@ -322,35 +331,48 @@ class Anix extends models_1.AnimeParser { .replace("'", '') .replace("'", ''); const data = JSON.parse(extractedJson); - defaultUrl = data[0].url; - episodeSources.sources.push({ - url: defaultUrl, - quality: `default`, - isM3U8: true, - }); + if (type != '') { + for (const item of data) { + if (item.type.toUpperCase() == type.toUpperCase()) { + defaultUrl = item.url; + break; + } + } + } + else { + defaultUrl = data[0].url; + } + if (defaultUrl != '') + episodeSources.sources.push({ + url: defaultUrl, + quality: `default`, + isM3U8: defaultUrl.includes('.m3u8'), + }); } else { console.error('No JSON data found in loadIframePlayer call.'); } }); - console.log(defaultUrl); - const m3u8Content = await this.client.get(defaultUrl, { - headers: { - Referer: uri.origin, - }, - }); - if (m3u8Content.data.includes('EXTM3U')) { - const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); - for (const video of videoList !== null && videoList !== void 0 ? videoList : []) { - if (video.includes('BANDWIDTH')) { - const url = video.split('\n')[1]; - const quality = video.split('RESOLUTION=')[1].split('\n')[0].split('x')[1]; - const path = defaultUrl.replace(/\/[^/]*\.m3u8$/, '/'); - episodeSources.sources.push({ - url: path + url, - quality: `${quality.split(',')[0]}p`, - isM3U8: true, - }); + if (defaultUrl != '' && !defaultUrl.includes('.mp4')) { + const options = { + headers: { + Referer: url, + }, + }; + const m3u8Content = await this.client.get(defaultUrl, options); + if (m3u8Content.data.includes('EXTM3U')) { + const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); + for (const video of videoList !== null && videoList !== void 0 ? videoList : []) { + if (video.includes('BANDWIDTH')) { + const url = video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split('\n')[0].split('x')[1]; + const path = defaultUrl.replace(/\/[^/]*\.m3u8$/, '/'); + episodeSources.sources.push({ + url: path + url, + quality: `${quality.split(',')[0]}p`, + isM3U8: true, + }); + } } } } @@ -373,7 +395,6 @@ class Anix extends models_1.AnimeParser { */ this.fetchEpisodeServers = async (id, episodeId) => { const url = `${this.baseUrl}/anime/${id}/${episodeId}`; - const uri = new URL(url); const res = await this.client.get(url); const $ = (0, cheerio_1.load)(res.data); const servers = []; @@ -387,6 +408,56 @@ class Anix extends models_1.AnimeParser { }); return servers; }; + /** + * + * @param id Anime id + * @param episodeId Episode id + * @param type Type (optional) (options: `sub`, `dub`, `raw`) + */ + this.fetchEpisodeServerType = async (id, episodeId, type) => { + const url = `${this.baseUrl}/anime/${id}/${episodeId}`; + const res = await this.client.get(url); + const $ = (0, cheerio_1.load)(res.data); + const subs = []; + const dubs = []; + const raw = []; + $('.ani-server-type-pad').each((index, element) => { + $(element) + .find('.server') + .each((i, el) => { + const serverData = { + name: $(el).text().trim(), + url: $(el).attr('data-video'), + }; + const dataType = $(el).attr('data-typesv').split('-')[0]; + if (dataType === 'SUB') { + subs.push(serverData); + } + else if (dataType === 'DUB') { + dubs.push(serverData); + } + else if (dataType === 'RAW') { + raw.push(serverData); + } + }); + }); + if (!type) { + return { sub: subs, dub: dubs, raw: raw }; + } + // Utilizando un string para seleccionar el tipo + if (type.toUpperCase() === 'SUB') { + return subs; + } + else if (type.toUpperCase() === 'DUB') { + return dubs; + } + else if (type.toUpperCase() === 'RAW') { + return raw; + } + else { + throw new Error('Invalid server type'); + } + }; this.baseUrl = customBaseURL ? customBaseURL.startsWith('http://') || customBaseURL.startsWith('https://') ? customBaseURL diff --git a/dist/providers/anime/anix.js.map b/dist/providers/anime/anix.js.map index ea93d230e..572f474a5 100644 --- a/dist/providers/anime/anix.js.map +++ b/dist/providers/anime/anix.js.map @@ -1 +1 @@ -{"version":3,"file":"anix.js","sourceRoot":"","sources":["../../../src/providers/anime/anix.ts"],"names":[],"mappings":";;AAAA,qCAAwC;AAExC,yCAYsB;AACtB,iDAAkE;AAGlE,MAAM,IAAK,SAAQ,oBAAW;IAoB5B,YAAY,aAAsB,EAAE,KAAmB,EAAE,OAAsB;QAC7E,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QApBN,SAAI,GAAG,MAAM,CAAC;QACb,YAAO,GAAG,iBAAiB,CAAC;QAC5B,SAAI,GAAG,8BAA8B,CAAC;QACtC,cAAS,GAAG,YAAY,CAAC;QAC3B,kBAAa,GAAG;YAC/B,KAAK,EAAE,CAAC;YACR,EAAE,EAAE,CAAC;YACL,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,CAAC;YACV,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,CAAC;SACd,CAAC;QACe,gBAAW,GAAG;YAC7B,KAAK,EAAE,6DAA6D;YACpE,OAAO,EAAE,aAAa;SACvB,CAAC;QACe,gBAAW,GAAG,WAAW,IAAI,CAAC,aAAa,CAAC,KAAK,WAAW,IAAI,CAAC,aAAa,CAAC,EAAE,WAAW,IAAI,CAAC,aAAa,CAAC,GAAG,WAAW,IAAI,CAAC,aAAa,CAAC,GAAG,WAAW,IAAI,CAAC,aAAa,CAAC,OAAO,WAAW,IAAI,CAAC,aAAa,CAAC,UAAU,aAAa,oBAAW,CAAC,OAAO,aAAa,oBAAW,CAAC,SAAS,EAAE,CAAC;QACrS,kBAAa,GAAG,gBAAgB,CAAC;QAWlD;;WAEG;QACH,wBAAmB,GAAG,KAAK,EAAE,OAAe,CAAC,EAAE,IAAa,EAAkC,EAAE;YAC9F,IAAI,CAAC;gBACH,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,WAAW,+BAA+B,IAAI,EAAE,CAAC;gBAC1F,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AE,EAAE,EAAE;gBACd,OAAO,CAAC,IAAI,CAAC;oBACX,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE;oBACzB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAE;iBAC/B,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACL,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;QA3XA,IAAI,CAAC,OAAO,GAAG,aAAa;YAC1B,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC;gBAC3E,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,UAAU,aAAa,EAAE;YAC7B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACnB,CAAC;CAuXF;AAED,kBAAe,IAAI,CAAC"} \ No newline at end of file +{"version":3,"file":"anix.js","sourceRoot":"","sources":["../../../src/providers/anime/anix.ts"],"names":[],"mappings":";;AAAA,qCAAwC;AAExC,yCAWsB;AACtB,iDAAyD;AAGzD,MAAM,IAAK,SAAQ,oBAAW;IAsB5B,YAAY,aAAsB,EAAE,KAAmB,EAAE,OAAsB;QAC7E,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAtBN,SAAI,GAAG,MAAM,CAAC;QACb,YAAO,GAAG,iBAAiB,CAAC;QAC5B,SAAI,GAAG,8BAA8B,CAAC;QACtC,cAAS,GAAG,YAAY,CAAC;QAC3B,kBAAa,GAAG;YAC/B,KAAK,EAAE,CAAC;YACR,EAAE,EAAE,CAAC;YACL,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,CAAC;YACV,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,CAAC;SACd,CAAC;QACe,gBAAW,GAAG;YAC7B,KAAK,EAAE,6DAA6D;YACpE,OAAO,EAAE,aAAa;YACtB,GAAG,EAAE,gBAAgB;YACrB,GAAG,EAA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C;YACd,CAAC;iBAAM,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;gBACxC,OAAO,IAAI,CAAC;YACd,CAAC;iBAAM,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;gBACxC,OAAO,GAAG,CAAC;YACb,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACzC,CAAC;QACH,CAAC,CAAC;QAxbA,IAAI,CAAC,OAAO,GAAG,aAAa;YAC1B,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC;gBAC3E,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,UAAU,aAAa,EAAE;YAC7B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACnB,CAAC;CAobF;AAED,kBAAe,IAAI,CAAC"} diff --git a/src/providers/anime/anix.ts b/src/providers/anime/anix.ts index 700c1597c..8e600ecb1 100644 --- a/src/providers/anime/anix.ts +++ b/src/providers/anime/anix.ts @@ -7,7 +7,6 @@ import { IAnimeResult, ISource, IEpisodeServer, - SubOrSub, MediaFormat, MediaStatus, StreamingServers, @@ -32,6 +31,8 @@ class Anix extends AnimeParser { private readonly MediaRegion = { ANIME: 'country[]=1&country[]=2&country[]=3&country[]=4&country[]=6', DONGHUA: 'country[]=5', + SUB: 'language[]=sub', + DUB: 'language[]=dub', }; private readonly defaultSort = `&type[]=${this.MediaCategory.MOVIE}&type[]=${this.MediaCategory.TV}&type[]=${this.MediaCategory.ONA}&type[]=${this.MediaCategory.OVA}&type[]=${this.MediaCategory.SPECIAL}&type[]=${this.MediaCategory.TV_SPECIAL}&status[]=${MediaStatus.ONGOING}&status[]=${MediaStatus.COMPLETED}`; private readonly requestedWith = 'XMLHttpRequest'; @@ -55,7 +56,12 @@ class Anix extends AnimeParser { url += `&${this.MediaRegion.ANIME}`; } else if (type == 2) { url += `&${this.MediaRegion.DONGHUA}`; + } else if (type == 3) { + url += `&${this.MediaRegion.SUB}`; + } else if (type == 4) { + url += `&${this.MediaRegion.DUB}`; } + const res = await this.client.get(url); const $ = load(res.data); @@ -284,11 +290,13 @@ class Anix extends AnimeParser { * @param id Anime id * @param episodeId Episode id * @param server Streaming server(optional) + * @param type Type (optional) (options: `sub`, `dub`, `raw`) */ override fetchEpisodeSources = async ( id: string, episodeId: string, - server: StreamingServers = StreamingServers.BuiltIn + server: StreamingServers = StreamingServers.BuiltIn, + type: string = '' ): Promise => { const url = `${this.baseUrl}/anime/${id}/${episodeId}`; const uri = new URL(url); @@ -352,36 +360,48 @@ class Anix extends AnimeParser { .replace("'", '') .replace("'", ''); const data = JSON.parse(extractedJson); - defaultUrl = data[0].url; - episodeSources.sources.push({ - url: defaultUrl, - quality: `default`, - isM3U8: true, - }); + if (type != '') { + for (const item of data) { + if (item.type.toUpperCase() == type.toUpperCase()) { + defaultUrl = item.url; + break; + } + } + } else { + defaultUrl = data[0].url; + } + if (defaultUrl != '') + episodeSources.sources.push({ + url: defaultUrl, + quality: `default`, + isM3U8: defaultUrl.includes('.m3u8'), + }); } else { console.error('No JSON data found in loadIframePlayer call.'); } }); - const m3u8Content = await this.client.get(defaultUrl, { - headers: { - Referer: uri.origin, - }, - }); - - if (m3u8Content.data.includes('EXTM3U')) { - const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); - for (const video of videoList ?? []) { - if (video.includes('BANDWIDTH')) { - const url = video.split('\n')[1]; - const quality = video.split('RESOLUTION=')[1].split('\n')[0].split('x')[1]; - const path = defaultUrl.replace(/\/[^/]*\.m3u8$/, '/'); - episodeSources.sources.push({ - url: path + url, - quality: `${quality.split(',')[0]}p`, - isM3U8: true, - }); + if (defaultUrl != '' && !defaultUrl.includes('.mp4')) { + const options = { + headers: { + Referer: url, + }, + }; + const m3u8Content = await this.client.get(defaultUrl, options); + if (m3u8Content.data.includes('EXTM3U')) { + const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); + for (const video of videoList ?? []) { + if (video.includes('BANDWIDTH')) { + const url = video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split('\n')[0].split('x')[1]; + const path = defaultUrl.replace(/\/[^/]*\.m3u8$/, '/'); + episodeSources.sources.push({ + url: path + url, + quality: `${quality.split(',')[0]}p`, + isM3U8: true, + }); + } } } } @@ -404,7 +424,6 @@ class Anix extends AnimeParser { */ override fetchEpisodeServers = async (id: string, episodeId: string): Promise => { const url = `${this.baseUrl}/anime/${id}/${episodeId}`; - const uri = new URL(url); const res = await this.client.get(url); const $ = load(res.data); const servers: IEpisodeServer[] = []; @@ -418,6 +437,59 @@ class Anix extends AnimeParser { }); return servers; }; + + /** + * + * @param id Anime id + * @param episodeId Episode id + * @param type Type (optional) (options: `sub`, `dub`, `raw`) + */ + fetchEpisodeServerType = async ( + id: string, + episodeId: string, + type?: string + ): Promise<{ sub: IEpisodeServer[]; dub: IEpisodeServer[]; raw: IEpisodeServer[] } | IEpisodeServer[]> => { + const url = `${this.baseUrl}/anime/${id}/${episodeId}`; + const res = await this.client.get(url); + const $ = load(res.data); + const subs: IEpisodeServer[] = []; + const dubs: IEpisodeServer[] = []; + const raw: IEpisodeServer[] = []; + + $('.ani-server-type-pad').each((index, element) => { + $(element) + .find('.server') + .each((i, el) => { + const serverData = { + name: $(el).text().trim(), + url: $(el).attr('data-video')!, + }; + const dataType = $(el).attr('data-typesv')!.split('-')[0]; + if (dataType === 'SUB') { + subs.push(serverData); + } else if (dataType === 'DUB') { + dubs.push(serverData); + } else if (dataType === 'RAW') { + raw.push(serverData); + } + }); + }); + + if (!type) { + return { sub: subs, dub: dubs, raw: raw }; + } + + // Utilizando un string para seleccionar el tipo + if (type.toUpperCase() === 'SUB') { + return subs; + } else if (type.toUpperCase() === 'DUB') { + return dubs; + } else if (type.toUpperCase() === 'RAW') { + return raw; + } else { + throw new Error('Invalid server type'); + } + }; } export default Anix; diff --git a/test/anime/anix.test.ts b/test/anime/anix.test.ts index ccb999115..e34d22af5 100644 --- a/test/anime/anix.test.ts +++ b/test/anime/anix.test.ts @@ -36,3 +36,56 @@ test('returns a filled array of servers', async () => { const data = await anix.fetchEpisodeServers('douluo-dalu-ii-jueshi-tangmen', 'ep-76'); expect(data).not.toEqual([]); }); + +test('returns a filled array of recent episodes (type: sub)', async () => { + const data = await anix.fetchRecentEpisodes(1, 3); + expect(data).not.toEqual([]); +}); + +test('returns a filled array of recent episodes (type: dub)', async () => { + const data = await anix.fetchRecentEpisodes(1, 4); + expect(data).not.toEqual([]); +}); + +test('returns a filled array of servers (type: all)', async () => { + const data = await anix.fetchEpisodeServerType('dandadan', 'ep-11'); + expect(data).not.toEqual([]); +}); + +test('returns a filled array of servers (type: sub)', async () => { + const data = await anix.fetchEpisodeServerType('dandadan', 'ep-11', 'sub'); + expect(data).not.toEqual([]); +}); + +test('returns a filled array of servers (type: dub)', async () => { + const data = await anix.fetchEpisodeServerType('dandadan', 'ep-11', 'dub'); + expect(data).not.toEqual([]); +}); + +test('returns a filled array of servers (type: raw)', async () => { + const data = await anix.fetchEpisodeServerType('dandadan', 'ep-11', 'raw'); + expect(data).not.toEqual([]); +}); + +test('returns a filled object of episode sources (type: sub)', async () => { + const data = await anix.fetchEpisodeSources('dandadan', 'ep-11', undefined, 'sub'); + expect(data.sources).not.toEqual([]); + expect(data.subtitles).not.toEqual([]); +}); + +test('returns a filled object of episode sources (type: dub)', async () => { + const data = await anix.fetchEpisodeSources('dandadan', 'ep-11', undefined, 'dub'); + expect(data.sources).not.toEqual([]); + expect(data.subtitles).not.toEqual([]); +}); + +test('returns a filled object of episode sources (type: raw)', async () => { + const data = await anix.fetchEpisodeSources('dandadan', 'ep-11', undefined, 'raw'); + expect(data.sources).not.toEqual([]); + expect(data.subtitles).not.toEqual([]); +}); + +test('returns a empty object of episode sources (type: invalid option)', async () => { + const data = await anix.fetchEpisodeSources('dandadan', 'ep-11', undefined, 'invalid'); + expect(data.sources).toEqual([]); +});