diff --git a/dist/extractors/index.d.ts b/dist/extractors/index.d.ts index 2d9fd68e2..c82894529 100644 --- a/dist/extractors/index.d.ts +++ b/dist/extractors/index.d.ts @@ -1,15 +1,18 @@ +import AsianLoad from './asianload'; +import BilibiliExtractor from './bilibili'; +import Filemoon from './filemoon'; import GogoCDN from './gogocdn'; -import StreamSB from './streamsb'; -import VidCloud from './vidcloud'; -import MixDrop from './mixdrop'; import Kwik from './kwik'; +import MixDrop from './mixdrop'; +import Mp4Upload from './mp4upload'; import RapidCloud from './rapidcloud'; -import StreamTape from './streamtape'; -import VizCloud from './vizcloud'; -import Filemoon from './filemoon'; -import BilibiliExtractor from './bilibili'; -import AsianLoad from './asianload'; -import StreamLare from './streamlare'; import SmashyStream from './smashystream'; import StreamHub from './streamhub'; -export { GogoCDN, StreamSB, VidCloud, MixDrop, Kwik, RapidCloud, StreamTape, VizCloud, Filemoon, BilibiliExtractor, AsianLoad, StreamHub, StreamLare, SmashyStream, }; +import StreamLare from './streamlare'; +import StreamSB from './streamsb'; +import StreamTape from './streamtape'; +import StreamWish from './streamwish'; +import VidCloud from './vidcloud'; +import VidMoly from './vidmoly'; +import VizCloud from './vizcloud'; +export { AsianLoad, BilibiliExtractor, Filemoon, GogoCDN, Kwik, MixDrop, Mp4Upload, RapidCloud, SmashyStream, StreamHub, StreamLare, StreamSB, StreamTape, StreamWish, VidCloud, VidMoly, VizCloud, }; diff --git a/dist/extractors/index.js b/dist/extractors/index.js index 1e1210038..79084d7a9 100644 --- a/dist/extractors/index.js +++ b/dist/extractors/index.js @@ -3,33 +3,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.SmashyStream = exports.StreamLare = exports.StreamHub = exports.AsianLoad = exports.BilibiliExtractor = exports.Filemoon = exports.VizCloud = exports.StreamTape = exports.RapidCloud = exports.Kwik = exports.MixDrop = exports.VidCloud = exports.StreamSB = exports.GogoCDN = void 0; +exports.VizCloud = exports.VidMoly = exports.VidCloud = exports.StreamWish = exports.StreamTape = exports.StreamSB = exports.StreamLare = exports.StreamHub = exports.SmashyStream = exports.RapidCloud = exports.Mp4Upload = exports.MixDrop = exports.Kwik = exports.GogoCDN = exports.Filemoon = exports.BilibiliExtractor = exports.AsianLoad = void 0; +const asianload_1 = __importDefault(require("./asianload")); +exports.AsianLoad = asianload_1.default; +const bilibili_1 = __importDefault(require("./bilibili")); +exports.BilibiliExtractor = bilibili_1.default; +const filemoon_1 = __importDefault(require("./filemoon")); +exports.Filemoon = filemoon_1.default; const gogocdn_1 = __importDefault(require("./gogocdn")); exports.GogoCDN = gogocdn_1.default; -const streamsb_1 = __importDefault(require("./streamsb")); -exports.StreamSB = streamsb_1.default; -const vidcloud_1 = __importDefault(require("./vidcloud")); -exports.VidCloud = vidcloud_1.default; -const mixdrop_1 = __importDefault(require("./mixdrop")); -exports.MixDrop = mixdrop_1.default; const kwik_1 = __importDefault(require("./kwik")); exports.Kwik = kwik_1.default; +const mixdrop_1 = __importDefault(require("./mixdrop")); +exports.MixDrop = mixdrop_1.default; +const mp4upload_1 = __importDefault(require("./mp4upload")); +exports.Mp4Upload = mp4upload_1.default; const rapidcloud_1 = __importDefault(require("./rapidcloud")); exports.RapidCloud = rapidcloud_1.default; -const streamtape_1 = __importDefault(require("./streamtape")); -exports.StreamTape = streamtape_1.default; -const vizcloud_1 = __importDefault(require("./vizcloud")); -exports.VizCloud = vizcloud_1.default; -const filemoon_1 = __importDefault(require("./filemoon")); -exports.Filemoon = filemoon_1.default; -const bilibili_1 = __importDefault(require("./bilibili")); -exports.BilibiliExtractor = bilibili_1.default; -const asianload_1 = __importDefault(require("./asianload")); -exports.AsianLoad = asianload_1.default; -const streamlare_1 = __importDefault(require("./streamlare")); -exports.StreamLare = streamlare_1.default; const smashystream_1 = __importDefault(require("./smashystream")); exports.SmashyStream = smashystream_1.default; const streamhub_1 = __importDefault(require("./streamhub")); exports.StreamHub = streamhub_1.default; +const streamlare_1 = __importDefault(require("./streamlare")); +exports.StreamLare = streamlare_1.default; +const streamsb_1 = __importDefault(require("./streamsb")); +exports.StreamSB = streamsb_1.default; +const streamtape_1 = __importDefault(require("./streamtape")); +exports.StreamTape = streamtape_1.default; +const streamwish_1 = __importDefault(require("./streamwish")); +exports.StreamWish = streamwish_1.default; +const vidcloud_1 = __importDefault(require("./vidcloud")); +exports.VidCloud = vidcloud_1.default; +const vidmoly_1 = __importDefault(require("./vidmoly")); +exports.VidMoly = vidmoly_1.default; +const vizcloud_1 = __importDefault(require("./vizcloud")); +exports.VizCloud = vizcloud_1.default; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/extractors/index.js.map b/dist/extractors/index.js.map index 96315af5e..c8f281b75 100644 --- a/dist/extractors/index.js.map +++ b/dist/extractors/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extractors/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAgB9B,kBAhBK,iBAAO,CAgBL;AAfT,0DAAkC;AAgBhC,mBAhBK,kBAAQ,CAgBL;AAfV,0DAAkC;AAgBhC,mBAhBK,kBAAQ,CAgBL;AAfV,wDAAgC;AAgB9B,kBAhBK,iBAAO,CAgBL;AAfT,kDAA0B;AAgBxB,eAhBK,cAAI,CAgBL;AAfN,8DAAsC;AAgBpC,qBAhBK,oBAAU,CAgBL;AAfZ,8DAAsC;AAgBpC,qBAhBK,oBAAU,CAgBL;AAfZ,0DAAkC;AAgBhC,mBAhBK,kBAAQ,CAgBL;AAfV,0DAAkC;AAgBhC,mBAhBK,kBAAQ,CAgBL;AAfV,0DAA2C;AAgBzC,4BAhBK,kBAAiB,CAgBL;AAfnB,4DAAoC;AAgBlC,oBAhBK,mBAAS,CAgBL;AAfX,8DAAsC;AAiBpC,qBAjBK,oBAAU,CAiBL;AAhBZ,kEAA0C;AAiBxC,uBAjBK,sBAAY,CAiBL;AAhBd,4DAAoC;AAclC,oBAdK,mBAAS,CAcL"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extractors/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AAmBlC,oBAnBK,mBAAS,CAmBL;AAlBX,0DAA2C;AAmBzC,4BAnBK,kBAAiB,CAmBL;AAlBnB,0DAAkC;AAmBhC,mBAnBK,kBAAQ,CAmBL;AAlBV,wDAAgC;AAmB9B,kBAnBK,iBAAO,CAmBL;AAlBT,kDAA0B;AAmBxB,eAnBK,cAAI,CAmBL;AAlBN,wDAAgC;AAmB9B,kBAnBK,iBAAO,CAmBL;AAlBT,4DAAoC;AAmBlC,oBAnBK,mBAAS,CAmBL;AAlBX,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,kEAA0C;AAmBxC,uBAnBK,sBAAY,CAmBL;AAlBd,4DAAoC;AAmBlC,oBAnBK,mBAAS,CAmBL;AAlBX,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,0DAAkC;AAmBhC,mBAnBK,kBAAQ,CAmBL;AAlBV,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,0DAAkC;AAmBhC,mBAnBK,kBAAQ,CAmBL;AAlBV,wDAAgC;AAmB9B,kBAnBK,iBAAO,CAmBL;AAlBT,0DAAkC;AAmBhC,mBAnBK,kBAAQ,CAmBL"} \ No newline at end of file diff --git a/dist/extractors/mp4upload.d.ts b/dist/extractors/mp4upload.d.ts new file mode 100644 index 000000000..00f3c66bb --- /dev/null +++ b/dist/extractors/mp4upload.d.ts @@ -0,0 +1,7 @@ +import { VideoExtractor, IVideo } from '../models'; +declare class Mp4Upload extends VideoExtractor { + protected serverName: string; + protected sources: IVideo[]; + extract: (videoUrl: URL) => Promise; +} +export default Mp4Upload; diff --git a/dist/extractors/mp4upload.js b/dist/extractors/mp4upload.js new file mode 100644 index 000000000..385a14189 --- /dev/null +++ b/dist/extractors/mp4upload.js @@ -0,0 +1,34 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const axios_1 = __importDefault(require("axios")); +const models_1 = require("../models"); +class Mp4Upload extends models_1.VideoExtractor { + constructor() { + super(...arguments); + this.serverName = 'mp4upload'; + this.sources = []; + this.extract = async (videoUrl) => { + try { + const { data } = await axios_1.default.get(videoUrl.href); + const playerSrc = data.match(/(?<=player\.src\()\s*{\s*type:\s*"[^"]+",\s*src:\s*"([^"]+)"\s*}\s*(?=\);)/s); + const streamUrl = playerSrc[1]; + if (!streamUrl) + throw new Error("Stream url not found"); + this.sources.push({ + quality: 'auto', + url: streamUrl, + isM3U8: streamUrl.includes('.m3u8'), + }); + return this.sources; + } + catch (err) { + throw new Error(err.message); + } + }; + } +} +exports.default = Mp4Upload; +//# sourceMappingURL=mp4upload.js.map \ No newline at end of file diff --git a/dist/extractors/mp4upload.js.map b/dist/extractors/mp4upload.js.map new file mode 100644 index 000000000..f16237423 --- /dev/null +++ b/dist/extractors/mp4upload.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mp4upload.js","sourceRoot":"","sources":["../../src/extractors/mp4upload.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,sCAAmD;AAEnD,MAAM,SAAU,SAAQ,uBAAc;IAAtC;;QACqB,eAAU,GAAG,WAAW,CAAC;QACzB,YAAO,GAAa,EAAE,CAAC;QAEjC,YAAO,GAAG,KAAK,EAAE,QAAa,EAAqB,EAAE;YAC5D,IAAI;gBACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAEhD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;gBAC5G,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,SAAS;oBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAExD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBAChB,OAAO,EAAE,MAAM;oBACf,GAAG,EAAE,SAAS;oBACd,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC;iBACpC,CAAC,CAAC;gBAEH,OAAO,IAAI,CAAC,OAAO,CAAC;aACrB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;aACzC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/extractors/streamhub.js b/dist/extractors/streamhub.js index 69fed4401..c0fd4399d 100644 --- a/dist/extractors/streamhub.js +++ b/dist/extractors/streamhub.js @@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const axios_1 = __importDefault(require("axios")); -const cheerio_1 = require("cheerio"); const models_1 = require("../models"); class StreamHub extends models_1.VideoExtractor { constructor() { @@ -21,11 +20,7 @@ class StreamHub extends models_1.VideoExtractor { const { data } = await axios_1.default.get(videoUrl.href).catch(() => { throw new Error('Video not found'); }); - const $ = (0, cheerio_1.load)(data); - const ss = $.html().indexOf('eval(function(p,a,c,k,e,d)'); - const se = $.html().indexOf('', ss); - const s = $.html().substring(ss, se).replace('eval', ''); - const unpackedData = eval(s); + const unpackedData = eval(/(eval)(\(f.*?)(\n<\/script>)/s.exec(data)[2].replace('eval', '')); const links = (_a = unpackedData.match(new RegExp('sources:\\[\\{src:"(.*?)"'))) !== null && _a !== void 0 ? _a : []; const m3u8Content = await axios_1.default.get(links[1], { headers: { diff --git a/dist/extractors/streamhub.js.map b/dist/extractors/streamhub.js.map index 979ce08f8..22ca001db 100644 --- a/dist/extractors/streamhub.js.map +++ b/dist/extractors/stream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AAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;oBACvC,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;oBAC/D,KAAK,MAAM,KAAK,IAAI,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EAAE;wBACnC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;4BAAE,SAAS;wBAEtC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;wBACjC,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBAE1E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;4BAClB,GAAG,EAAE,GAAG;4BACR,OAAO,EAAE,GAAG,OAAO,GAAG;4BACtB,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;yBAC9B,CAAC,CAAC;qBACJ;iBACF;gBAED,OAAO,MAAM,CAAC;aACf;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;aACzC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/extractors/streamwish.d.ts b/dist/extractors/streamwish.d.ts new file mode 100644 index 000000000..fb94f0ea0 --- /dev/null +++ b/dist/extractors/streamwish.d.ts @@ -0,0 +1,7 @@ +import { VideoExtractor, IVideo } from '../models'; +declare class StreamWish extends VideoExtractor { + protected serverName: string; + protected sources: IVideo[]; + extract: (videoUrl: URL) => Promise; +} +export default StreamWish; diff --git a/dist/extractors/streamwish.js b/dist/extractors/streamwish.js new file mode 100644 index 000000000..e7078ea97 --- /dev/null +++ b/dist/extractors/streamwish.js @@ -0,0 +1,51 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const axios_1 = __importDefault(require("axios")); +const models_1 = require("../models"); +class StreamWish extends models_1.VideoExtractor { + constructor() { + super(...arguments); + this.serverName = 'streamwish'; + this.sources = []; + this.extract = async (videoUrl) => { + try { + const { data } = await axios_1.default.get(videoUrl.href); + const unPackagedData = eval(/(eval)(\(f.*?)(\n<\/script>)/s.exec(data)[2]); + const links = unPackagedData.match(/file:\s*"([^"]+)"/); + this.sources.push({ + quality: 'auto', + url: links[1], + isM3U8: links[1].includes('.m3u8'), + }); + const m3u8Content = await axios_1.default.get(links[1], { + headers: { + Referer: videoUrl.href, + }, + }); + 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('m3u8')) + continue; + const url = links[1].split('master.m3u8')[0] + video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split(',')[0].split('x')[1]; + this.sources.push({ + url: url, + quality: `${quality}`, + isM3U8: url.includes('.m3u8'), + }); + } + } + return this.sources; + } + catch (err) { + throw new Error(err.message); + } + }; + } +} +exports.default = StreamWish; +//# sourceMappingURL=streamwish.js.map \ No newline at end of file diff --git a/dist/extractors/streamwish.js.map b/dist/extractors/streamwish.js.map new file mode 100644 index 000000000..d1a7d2e65 --- /dev/null +++ b/dist/extractors/streamwish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"streamwish.js","sourceRoot":"","sources":["../../src/extractors/streamwish.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,sCAAmD;AAEnD,MAAM,UAAW,SAAQ,uBAAc;IAAvC;;QACqB,eAAU,GAAG,YAAY,CAAC;QAC1B,YAAO,GAAa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K,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBAE1E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;4BAChB,GAAG,EAAE,GAAG;4BACR,OAAO,EAAE,GAAG,OAAO,EAAE;4BACrB,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;yBAC9B,CAAC,CAAC;qBACJ;iBACF;gBAED,OAAO,IAAI,CAAC,OAAO,CAAC;aACrB;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;aACzC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/dist/extractors/vidmoly.d.ts b/dist/extractors/vidmoly.d.ts new file mode 100644 index 000000000..374b51aa6 --- /dev/null +++ b/dist/extractors/vidmoly.d.ts @@ -0,0 +1,7 @@ +import { VideoExtractor, IVideo } from '../models'; +declare class VidMoly extends VideoExtractor { + protected serverName: string; + protected sources: IVideo[]; + extract: (videoUrl: URL) => Promise; +} +export default VidMoly; diff --git a/dist/extractors/vidmoly.js b/dist/extractors/vidmoly.js new file mode 100644 index 000000000..791afbf9b --- /dev/null +++ b/dist/extractors/vidmoly.js @@ -0,0 +1,50 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const axios_1 = __importDefault(require("axios")); +const models_1 = require("../models"); +class VidMoly extends models_1.VideoExtractor { + constructor() { + super(...arguments); + this.serverName = 'vidmoly'; + this.sources = []; + this.extract = async (videoUrl) => { + try { + const { data } = await axios_1.default.get(videoUrl.href); + const links = data.match(/file:\s*"([^"]+)"/); + const m3u8Content = await axios_1.default.get(links[1], { + headers: { + Referer: videoUrl.href, + }, + }); + this.sources.push({ + quality: 'auto', + url: links[1], + isM3U8: links[1].includes('.m3u8'), + }); + 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('m3u8')) + continue; + const url = video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split(',')[0].split('x')[1]; + this.sources.push({ + url: url, + quality: `${quality}`, + isM3U8: url.includes('.m3u8'), + }); + } + } + return this.sources; + } + catch (err) { + throw new Error(err.message); + } + }; + } +} +exports.default = VidMoly; +//# sourceMappingURL=vidmoly.js.map \ No newline at end of file diff --git a/dist/extractors/vidmoly.js.map b/dist/extractors/vidmoly.js.map new file mode 100644 index 000000000..8a84d136a --- /dev/null +++ b/dist/extractors/vidmoly.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vidmoly.js","sourceRoot":"","sources":["../../src/extractors/vidmoly.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,sCAAmD;AAEnD,MAAM,OAAQ,SAAQ,uBAAc;IAApC;;QACqB,eAAU,GAAG,SAAS,CAAC;QACvB,YAAO,GAAa,EAAE,CAAC;QAEjC,YAAO,GAAG,KAAK,EAAE,QAAa,EAAqB,EAAE;YAC5D,IAAI;gBACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAEhD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;gBAE9C,MAAM,WAAW,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;oBAC5C,OAAO,EAAE;wBACP,OAAO,EAAE,QAAQ,CAAC,IAAI;qBACvB;iBACF,CAAC,CAAC;gBAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBAChB,OAAO,EAAE,MAAM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ICS, LIGHT_NOVELS, MANGA, MOVIES, META, NEWS } from './providers'; import { PROVIDERS_LIST } from './utils/providers-list'; -import { VizCloud, AsianLoad, GogoCDN, Kwik, MixDrop, RapidCloud, BilibiliExtractor, Filemoon, StreamSB, StreamTape, VidCloud, StreamHub, SmashyStream } from './extractors'; +import { VizCloud, AsianLoad, GogoCDN, Kwik, MixDrop, RapidCloud, BilibiliExtractor, Filemoon, StreamSB, StreamTape, VidCloud, StreamHub, SmashyStream, VidMoly, Mp4Upload, StreamWish } from './extractors'; import { IProviderStats, ISearch, IAnimeEpisode, IAnimeInfo, IAnimeResult, IEpisodeServer, IVideo, LibgenBook, StreamingServers, MediaStatus, SubOrSub, IMangaResult, IMangaChapter, IMangaInfo, ILightNovelResult, ILightNovelInfo, ILightNovelChapter, ILightNovelChapterContent, GetComicsComics, ComicRes, IMangaChapterPage, TvType, IMovieEpisode, IMovieInfo, ISource, ISubtitle, IMovieResult, Intro, Genres, INewsFeed, Topics, INewsInfo, FuzzyDate, ITitle, MediaFormat, ProxyConfig } from './models'; export { ANIME, BOOKS, COMICS, MANGA, LIGHT_NOVELS, MOVIES, META, NEWS }; export { PROVIDERS_LIST }; -export { Topics, Genres, SubOrSub, StreamingServers, MediaStatus, IProviderStats, IAnimeEpisode, IAnimeInfo, IAnimeResult, IEpisodeServer, IVideo, LibgenBook, IMangaResult, IMangaChapter, IMangaInfo, ILightNovelResult, ILightNovelInfo, ILightNovelChapter, ILightNovelChapterContent, GetComicsComics, ComicRes, ISearch, IMangaChapterPage, TvType, IMovieEpisode, IMovieInfo, ISource, ISubtitle, IMovieResult, Intro, INewsFeed, INewsInfo, FuzzyDate, ITitle, MediaFormat, ProxyConfig, GogoCDN, StreamSB, VidCloud, MixDrop, Kwik, RapidCloud, StreamTape, StreamHub, SmashyStream, VizCloud, Filemoon, BilibiliExtractor, AsianLoad, }; +export { Topics, Genres, SubOrSub, StreamingServers, MediaStatus, IProviderStats, IAnimeEpisode, IAnimeInfo, IAnimeResult, IEpisodeServer, IVideo, LibgenBook, IMangaResult, IMangaChapter, IMangaInfo, ILightNovelResult, ILightNovelInfo, ILightNovelChapter, ILightNovelChapterContent, GetComicsComics, ComicRes, ISearch, IMangaChapterPage, TvType, IMovieEpisode, IMovieInfo, ISource, ISubtitle, IMovieResult, Intro, INewsFeed, INewsInfo, FuzzyDate, ITitle, MediaFormat, ProxyConfig, GogoCDN, StreamSB, VidCloud, MixDrop, Kwik, RapidCloud, StreamTape, StreamHub, SmashyStream, VizCloud, AsianLoad, BilibiliExtractor, Filemoon, Mp4Upload, StreamWish, VidMoly, }; diff --git a/dist/index.js b/dist/index.js index 79ac3644a..ca59efebe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsianLoad = exports.BilibiliExtractor = exports.Filemoon = exports.VizCloud = exports.SmashyStream = exports.StreamHub = exports.StreamTape = exports.RapidCloud = exports.Kwik = exports.MixDrop = exports.VidCloud = exports.StreamSB = exports.GogoCDN = exports.MediaFormat = exports.TvType = exports.MediaStatus = exports.StreamingServers = exports.SubOrSub = exports.Genres = exports.Topics = exports.PROVIDERS_LIST = exports.NEWS = exports.META = exports.MOVIES = exports.LIGHT_NOVELS = exports.MANGA = exports.COMICS = exports.BOOKS = exports.ANIME = void 0; +exports.VidMoly = exports.StreamWish = exports.Mp4Upload = exports.Filemoon = exports.BilibiliExtractor = exports.AsianLoad = exports.VizCloud = exports.SmashyStream = exports.StreamHub = exports.StreamTape = exports.RapidCloud = exports.Kwik = exports.MixDrop = exports.VidCloud = exports.StreamSB = exports.GogoCDN = exports.MediaFormat = exports.TvType = exports.MediaStatus = exports.StreamingServers = exports.SubOrSub = exports.Genres = exports.Topics = exports.PROVIDERS_LIST = exports.NEWS = exports.META = exports.MOVIES = exports.LIGHT_NOVELS = exports.MANGA = exports.COMICS = exports.BOOKS = exports.ANIME = void 0; const providers_1 = require("./providers"); Object.defineProperty(exports, "ANIME", { enumerable: true, get: function () { return providers_1.ANIME; } }); Object.defineProperty(exports, "BOOKS", { enumerable: true, get: function () { return providers_1.BOOKS; } }); @@ -26,6 +26,9 @@ Object.defineProperty(exports, "StreamTape", { enumerable: true, get: function ( Object.defineProperty(exports, "VidCloud", { enumerable: true, get: function () { return extractors_1.VidCloud; } }); Object.defineProperty(exports, "StreamHub", { enumerable: true, get: function () { return extractors_1.StreamHub; } }); Object.defineProperty(exports, "SmashyStream", { enumerable: true, get: function () { return extractors_1.SmashyStream; } }); +Object.defineProperty(exports, "VidMoly", { enumerable: true, get: function () { return extractors_1.VidMoly; } }); +Object.defineProperty(exports, "Mp4Upload", { enumerable: true, get: function () { return extractors_1.Mp4Upload; } }); +Object.defineProperty(exports, "StreamWish", { enumerable: true, get: function () { return extractors_1.StreamWish; } }); const models_1 = require("./models"); Object.defineProperty(exports, "StreamingServers", { enumerable: true, get: function () { return models_1.StreamingServers; } }); Object.defineProperty(exports, "MediaStatus", { enumerable: true, get: function () { return models_1.MediaStatus; } }); diff --git a/dist/index.js.map b/dist/index.js.map index 652beffaf..15e2b3890 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAA4F;AAyDnF,sFAzDA,iBAAK,OAyDA;AAAE,sFAzDA,iBAAK,OAyDA;AAAE,uFAzDA,kBAAM,OAyDA;AAAS,6FAzDP,wBAAY,OAyDO;AAAnB,sFAzDc,iBAAK,OAyDd;AAAgB,uFAzDA,kBAAM,OAyDA;AAAE,qFAzDA,gBAAI,OAyDA;AAAE,qFAzDA,gBAAI,OAyDA;AAxDtE,2DAAwD;AAyD/C,+FAzDA,+BAAc,OAyDA;AAxDvB,6CAesB;AAwFpB,yFAtGA,qBAAQ,OAsGA;AAGR,0FAxGA,sBAAS,OAwGA;AAZT,wFA3FA,oBAAO,OA2FA;AAIP,qFA9FA,iBAAI,OA8FA;AADJ,wFA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FA;AAOZ,wFAjGA,oBAAO,OAiGA;AAFP,0FA9FA,sBAAS,OA8FA;AACT,2FA9FA,uBAAU,OA8FA;AA5FZ,qCAqCkB;AAQhB,iGApCA,yBAAgB,OAoCA;AAChB,4FApCA,oBAAW,OAoCA;AAFX,yFAjCA,iBAAQ,OAiCA;AAqBR,uFA3CA,eAAM,OA2CA;AAtBN,uFAdA,eAAM,OAcA;AADN,uFAXA,eAAM,OAWA;AAkCN,4FAzCA,oBAAW,OAyCA"} \ No newline at end of file diff --git a/dist/models/types.d.ts b/dist/models/types.d.ts index b0b9d5d77..7c369b3ad 100644 --- a/dist/models/types.d.ts +++ b/dist/models/types.d.ts @@ -149,6 +149,7 @@ export declare enum StreamingServers { GogoCDN = "gogocdn", StreamSB = "streamsb", MixDrop = "mixdrop", + Mp4Upload = "mp4upload", UpCloud = "upcloud", VidCloud = "vidcloud", StreamTape = "streamtape", @@ -156,7 +157,10 @@ export declare enum StreamingServers { MyCloud = "mycloud", Filemoon = "filemoon", VidStreaming = "vidstreaming", - SmashyStream = "smashystream" + SmashyStream = "smashystream", + StreamHub = "streamhub", + StreamWish = "streamwish", + VidMoly = "vidmoly" } export declare enum MediaStatus { ONGOING = "Ongoing", diff --git a/dist/models/types.js b/dist/models/types.js index bf4fdc85c..9b77e9f3a 100644 --- a/dist/models/types.js +++ b/dist/models/types.js @@ -20,6 +20,7 @@ var StreamingServers; StreamingServers["GogoCDN"] = "gogocdn"; StreamingServers["StreamSB"] = "streamsb"; StreamingServers["MixDrop"] = "mixdrop"; + StreamingServers["Mp4Upload"] = "mp4upload"; StreamingServers["UpCloud"] = "upcloud"; StreamingServers["VidCloud"] = "vidcloud"; StreamingServers["StreamTape"] = "streamtape"; @@ -29,6 +30,9 @@ var StreamingServers; StreamingServers["Filemoon"] = "filemoon"; StreamingServers["VidStreaming"] = "vidstreaming"; StreamingServers["SmashyStream"] = "smashystream"; + StreamingServers["StreamHub"] = "streamhub"; + StreamingServers["StreamWish"] = "streamwish"; + StreamingServers["VidMoly"] = "vidmoly"; })(StreamingServers || (exports.StreamingServers = StreamingServers = {})); var MediaStatus; (function (MediaStatus) { diff --git a/dist/models/types.js.map b/dist/models/types.js.map index 7e46558be..c6bf22a80 100644 --- a/dist/models/types.js.map +++ b/dist/models/types.js.map @@ -1 +1 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":";;;AAuDA,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,wBAAS,CAAA;IACT,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;AACvB,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB;AA6FD,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,6CAAyB,CAAA;IACzB,yCAAqB,CAAA;IACrB,mBAAmB;IACnB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iDAA6B,CAAA;IAC7B,iDAA6B,CAAA;AAC/B,CAAC,EAdW,gBAAgB,gCAAhB,gBAAgB,QAc3B;AAED,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,8CAA+B,CAAA;IAC/B,kCAAmB,CAAA;AACrB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,yBAAa,CAAA;AACf,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AA0ID;;GAEG;AACH,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,gCAAsB,CAAA;IACtB,yBAAe,CAAA;IACf,yBAAe,CAAA;AACjB,CAAC,EAJW,MAAM,sBAAN,MAAM,QAIjB;AA0ED,IAAY,MAoBX;AApBD,WAAY,MAAM;IAChB,2BAAiB,CAAA;IACjB,iCAAuB,CAAA;IACvB,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,uCAA6B,CAAA;IAC7B,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;IAC/B,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,yCAA+B,CAAA;IAC/B,2BAAiB,CAAA;IACjB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACvB,CAAC,EApBW,MAAM,sBAAN,MAAM,QAoBjB;AAED,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,iCAAuB,CAAA;IACvB,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,qCAA2B,CAAA;IAC3B,+BAAqB,CAAA;IACrB,+BAAqB,CAAA;IACrB,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,yBAAe,CAAA;IACf,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,sBAAN,MAAM,QAajB"} \ No newline at end of file +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/models/types.ts"],"names":[],"mappings":";;;AAuDA,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,wBAAS,CAAA;IACT,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;AACvB,CAAC,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CAAA;IACnB,yCAA+B,CAAA;IAC/B,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,yCAA+B,CAAA;IAC/B,2BAAiB,CAAA;IACjB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACvB,CAAC,EApBW,MAAM,sBAAN,MAAM,QAoBjB;AAED,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,yBAAe,CAAA;IACf,iCAAuB,CAAA;IACvB,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,qCAA2B,CAAA;IAC3B,+BAAqB,CAAA;IACrB,+BAAqB,CAAA;IACrB,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,yBAAe,CAAA;IACf,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,sBAAN,MAAM,QAajB"} \ No newline at end of file diff --git a/dist/providers/manga/mangasee123.d.ts b/dist/providers/manga/mangasee123.d.ts index cedd15894..f8f623f90 100644 --- a/dist/providers/manga/mangasee123.d.ts +++ b/dist/providers/manga/mangasee123.d.ts @@ -4,7 +4,6 @@ declare class Mangasee123 extends MangaParser { protected baseUrl: string; protected logo: string; protected classPath: string; - private readonly sgProxy; fetchMangaInfo: (mangaId: string, ...args: any) => Promise; fetchChapterPages: (chapterId: string, ...args: any) => Promise; search: (query: string, ...args: any[]) => Promise>; diff --git a/dist/providers/manga/mangasee123.js b/dist/providers/manga/mangasee123.js index 6c0b47b32..a689c5f2c 100644 --- a/dist/providers/manga/mangasee123.js +++ b/dist/providers/manga/mangasee123.js @@ -14,7 +14,7 @@ class Mangasee123 extends models_1.MangaParser { this.baseUrl = 'https://mangasee123.com'; this.logo = 'https://scontent.fman4-1.fna.fbcdn.net/v/t1.6435-1/80033336_1830005343810810_419412485691408384_n.png?stp=dst-png_p148x148&_nc_cat=104&ccb=1-7&_nc_sid=1eb0c7&_nc_ohc=XpeoABDI-sEAX-5hLFV&_nc_ht=scontent.fman4-1.fna&oh=00_AT9nIRz5vPiNqqzNpSg2bJymX22rZ1JumYTKBqg_cD0Alg&oe=6317290E'; this.classPath = 'MANGA.Mangasee123'; - this.sgProxy = 'https://cors.consumet.stream'; + // private readonly sgProxy = 'https://cors.consumet.stream'; this.fetchMangaInfo = async (mangaId, ...args) => { const mangaInfo = { id: mangaId, @@ -22,7 +22,7 @@ class Mangasee123 extends models_1.MangaParser { }; const url = `${this.baseUrl}/manga`; try { - const { data } = await axios_1.default.get(`${this.sgProxy}/${url}/${mangaId}`); + const { data } = await axios_1.default.get(`${url}/${mangaId}`); const $ = (0, cheerio_1.load)(data); const schemaScript = $('body > script:nth-child(15)').get()[0].children[0]; if ((0, domhandler_1.isText)(schemaScript)) { @@ -56,7 +56,7 @@ class Mangasee123 extends models_1.MangaParser { const images = []; const url = `${this.baseUrl}/read-online/${chapterId}-page-1.html`; try { - const { data } = await axios_1.default.get(`${this.sgProxy}/${url}`); + const { data } = await axios_1.default.get(`${url}`); const $ = (0, cheerio_1.load)(data); const chapterScript = $('body > script:nth-child(19)').get()[0].children[0]; if ((0, domhandler_1.isText)(chapterScript)) { @@ -86,7 +86,7 @@ class Mangasee123 extends models_1.MangaParser { const matches = []; const sanitizedQuery = query.replace(/\s/g, '').toLowerCase(); try { - const { data } = await axios_1.default.get(`${this.sgProxy}/https://mangasee123.com/_search.php`); + const { data } = await axios_1.default.get(`https://mangasee123.com/_search.php`); for (const i in data) { const sanitizedAlts = []; const item = data[i]; @@ -140,7 +140,10 @@ class Mangasee123 extends models_1.MangaParser { // (async () => { // const manga = new Mangasee123(); // const mediaInfo = await manga.search('oyasumi'); -// console.log(mediaInfo); +// const mangaInfo = await manga.fetchMangaInfo(mediaInfo.results[0].id); +// const chapterPages = await manga.fetchChapterPages(mangaInfo.chapters![0].id); +// console.log(chapterPages); +// console.log(mediaInfo, mangaInfo); // })(); exports.default = Mangasee123; //# sourceMappingURL=mangasee123.js.map \ No newline at end of file diff --git a/dist/providers/manga/mangasee123.js.map b/dist/providers/manga/mangasee123.js.map index 293d52948..17a558ef4 100644 --- a/dist/providers/manga/mangasee123.js.map +++ b/dist/providers/manga/mangasee123.js.map @@ -1 +1 @@ -{"version":3,"file":"mangasee123.js","sourceRoot":"","sources":["../../../src/providers/manga/mangasee123.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,qCAA+B;AAC/B,2CAAoC;AAEpC,yCAOsB;AAEtB,MAAM,WAAY,SAAQ,oBAAW;IAArC;;QACoB,SAAI,GAAG,UAAU,CAAC;QACjB,YAAO,GAAG,yBAAyB,CAAC;QACpC,SAAI,GACrB,wRAAwR,CAAC;QACxQ,cAAS,GAAG,mBAAmB,CAAC;QAElC,YAAO,GAAG,8BAA8B,CAAC;QAEjD,mBAAc,GAAG,KAAK,EAAE,OAAe,EAAE,GAAG,IAAS,EAAuB,EAAE;YACrF,MAAM,SAAS,GAAe;gBAC5B,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,EAAE;aACV,CAAC;YACF,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,QAAQ,CAAC;YAEpC,IAAI;gBACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC;gBACtE,MAAM,CAAC,GAAG,IAAA,cAAI,EAAC,IAAI,CAAC,CAAC;gBAErB,MAAM,YAAY,GAAG,CAAC,CAAC,6BAA6B,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC3E,IAAI,IAAA,mBAAM,EAAC,YAAY,CAAC,EAAE;oBACxB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;oBAE/D,SAAS,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;oBACrC,SAAS,CAAC,SAAS,GAAG,UAAU,CAAC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,EAAE,CAAC,CAAC;YAEvE,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,EAAE,CAAC;QAClC,CAAC,CAAC;QAEM,8BAAyB,GAAG,CAAC,OAAe,EAAU,EAAE;YAC9D,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAE5D,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAEvC,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,CAAC,CAAC;IACJ,CAAC;CAAA;AAED,iBAAiB;AACjB,qCAAqC;AACrC,qDAAqD;AACrD,2EAA2E;AAC3E,mFAAmF;AACnF,+BAA+B;AAC/B,uCAAuC;AACvC,QAAQ;AAER,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/providers/movies/dramacool.d.ts b/dist/providers/movies/dramacool.d.ts index c85e701f8..d317fb7a1 100644 --- a/dist/providers/movies/dramacool.d.ts +++ b/dist/providers/movies/dramacool.d.ts @@ -7,8 +7,8 @@ declare class DramaCool extends MovieParser { supportedTypes: Set; search: (query: string, page?: number) => Promise>; fetchMediaInfo: (mediaId: string) => Promise; - fetchEpisodeSources: (episodeId: string, server?: StreamingServers) => Promise; fetchEpisodeServers(episodeId: string, ...args: any): Promise; + fetchEpisodeSources: (episodeId: string, server?: StreamingServers) => Promise; private removeContainsFromString; } export default DramaCool; diff --git a/dist/providers/movies/dramacool.js b/dist/providers/movies/dramacool.js index 2e3c2fff3..f4fd9bb15 100644 --- a/dist/providers/movies/dramacool.js +++ b/dist/providers/movies/dramacool.js @@ -11,17 +11,17 @@ class DramaCool extends models_1.MovieParser { constructor() { super(...arguments); this.name = 'DramaCool'; - this.baseUrl = 'https://www1.dramacool.cr'; + this.baseUrl = 'https://dramacool.hr'; this.logo = 'https://play-lh.googleusercontent.com/IaCb2JXII0OV611MQ-wSA8v_SAs9XF6E3TMDiuxGGXo4wp9bI60GtDASIqdERSTO5XU'; this.classPath = 'MOVIES.DramaCool'; this.supportedTypes = new Set([models_1.TvType.MOVIE, models_1.TvType.TVSERIES]); this.search = async (query, page = 1) => { - const searchResult = { - currentPage: page, - hasNextPage: false, - results: [], - }; try { + const searchResult = { + currentPage: page, + hasNextPage: false, + results: [], + }; const { data } = await axios_1.default.get(`${this.baseUrl}/search?keyword=${query.replace(/[\W_]+/g, '-')}&page=${page}`); const $ = (0, cheerio_1.load)(data); const navSelector = 'ul.pagination'; @@ -43,14 +43,14 @@ class DramaCool extends models_1.MovieParser { } }; this.fetchMediaInfo = async (mediaId) => { - const realMediaId = mediaId; - if (!mediaId.startsWith(this.baseUrl)) - mediaId = `${this.baseUrl}/${mediaId}`; - const mediaInfo = { - id: '', - title: '', - }; try { + const realMediaId = mediaId; + if (!mediaId.startsWith(this.baseUrl)) + mediaId = `${this.baseUrl}/${mediaId}`; + const mediaInfo = { + id: '', + title: '', + }; const { data } = await axios_1.default.get(mediaId); const $ = (0, cheerio_1.load)(data); mediaInfo.id = realMediaId; @@ -102,36 +102,16 @@ class DramaCool extends models_1.MovieParser { throw new Error('Server not supported'); } } - if (!episodeId.includes('.html')) - episodeId = `${this.baseUrl}/${episodeId}.html`; try { - const { data } = await axios_1.default.get(episodeId); - const $ = (0, cheerio_1.load)(data); - let serverUrl = ''; - switch (server) { - // asianload is the same as the standard server - case models_1.StreamingServers.AsianLoad: - serverUrl = `https:${$('.Standard').attr('data-video')}`; - if (!serverUrl.includes('asian')) - throw new Error('Try another server'); - break; - case models_1.StreamingServers.MixDrop: - serverUrl = $('.mixdrop').attr('data-video'); - if (!serverUrl.includes('mixdrop')) - throw new Error('Try another server'); - break; - case models_1.StreamingServers.StreamTape: - serverUrl = $('.streamtape').attr('data-video'); - if (!serverUrl.includes('streamtape')) - throw new Error('Try another server'); - break; - case models_1.StreamingServers.StreamSB: - serverUrl = $('.streamsb').attr('data-video'); - if (!serverUrl.includes('stream')) - throw new Error('Try another server'); - break; + if (!episodeId.includes('.html')) + episodeId = `${this.baseUrl}/${episodeId}.html`; + const servers = await this.fetchEpisodeServers(episodeId); + const i = servers.findIndex(s => s.name.toLowerCase() === server.toLowerCase()); + if (i === -1) { + throw new Error(`Server ${server} not found`); } - return await this.fetchEpisodeSources(serverUrl, server); + const serverUrl = new URL(servers.filter(s => s.name.toLowerCase() === server.toLowerCase())[0].url); + return await this.fetchEpisodeSources(serverUrl.href, server); } catch (err) { throw new Error(err.message); @@ -142,16 +122,30 @@ class DramaCool extends models_1.MovieParser { return str.toLowerCase().replace(/\n/g, '').replace(`${contains}:`, '').trim(); }; } - fetchEpisodeServers(episodeId, ...args) { - throw new Error('Method not implemented.'); + async fetchEpisodeServers(episodeId, ...args) { + try { + const episodeServers = []; + if (!episodeId.includes('.html')) + episodeId = `${this.baseUrl}/${episodeId}.html`; + const { data } = await axios_1.default.get(episodeId); + const $ = (0, cheerio_1.load)(data); + $('div.anime_muti_link > ul > li').map(async (i, ele) => { + const url = $(ele).attr('data-video'); + let name = $(ele).attr('class').replace('selected', '').trim(); + if (name.includes('Standard')) { + name = models_1.StreamingServers.AsianLoad; + } + episodeServers.push({ + name: name, + url: url.startsWith('//') ? url === null || url === void 0 ? void 0 : url.replace('//', 'https://') : url, + }); + }); + return episodeServers; + } + catch (err) { + throw new Error(err.message); + } } } -// (async () => { -// const drama = new Dramacool(); -// const search = await drama.search('vincenzo'); -// const mediaInfo = await drama.fetchMediaInfo(search.results[0].id); -// // const sources = await drama.fetchEpisodeSources(mediaInfo.episodes![0].id); -// console.log(mediaInfo); -// })(); exports.default = DramaCool; //# sourceMappingURL=dramacool.js.map \ No newline at end of file diff --git a/dist/providers/movies/dramacool.js.map b/dist/providers/movies/dramacool.js.map index f3d318604..70011c62f 100644 --- a/dist/providers/movies/dramacool.js.map +++ b/dist/providers/movies/dramacool.js.map @@ -1 +1 @@ -{"version":3,"file":"dramacool.js","sourceRoot":"","sources":["../../../src/providers/movies/dramacool.ts"],"names":[],"mappings":";;;;;AAAA,qCAA+B;AAC/B,kDAA0B;AAE1B,yCASsB;AACtB,iDAA4E;AAE5E,MAAM,SAAU,SAAQ,oBAAW;IAAnC;;QACoB,SAAI,GAAG,WAAW,CAAC;QAClB,YAAO,GAAG,2BAA2B,CAAC;QACtC,SAAI,GACrB,2GAA2G,CAAC;QAC3F,cAAS,GAAG,kBAAkB,CAAC;QACzC,mBAAc,GAAG,IAAI,GAAG,CAAC,CAAC,eAAM,CAAC,KAAK,EAAE,eAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE1D,WAAM,GAAG,KAAK,EAAE,KAAa,EAAE,OAAe,CAAC,EAAkC,EAAE;YAC1F,MAAM,YAAY,GAA0B;gBAC1C,WAAW,EAAE,IAAI;gBACjB,WAAW,EAAE,KAAK;gBAClB,OAAO,EAAE,EAAE;aACZ,CAAC;YAEF,IAAI;gBACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,eAAK,CAAC,GAAG,CAC9B,GAAG,IAAI,CAAC,OAAO,mBAAmB,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE,CAC/E,CAAC;gBAEF,MAAM,CAAC,GAAG,IAAA,cAAI,EAAC,IAAI,CAAC,CAAC;gBAErB,MAAM,WAAW,GAAG,eAAe,CAAC;gBAEpC,YAAY,CAAC,WAAW;oBACtB,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAE7F,CAAC,CAAC,yDAAyD,CAAC,CAA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BACjD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;4BAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;wBAC7E,MAAM;oBACR,KAAK,yBAAgB,CAAC,QAAQ;wBAC5B,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAE,CAAC;wBAC/C,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;4BAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;wBACzE,MAAM;iBACT;gBAED,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;aAC1D;YAAC,OAAO,GAAG,EAAE;gBACZ,MAAM,IAAI,KAAK,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;aACzC;QACH,CAAC,CAAC;QAMM,6BAAwB,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAE,EAAE;YACnE,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACjF,CAAC,CAAC;IACJ,CAAC;IARU,mBAAmB,CAAC,SAAiB,EAAE,GAAG,IAAS;QAC1D,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CAMF;AAED,iBAAiB;AACjB,mCAAmC;AACnC,mDAAmD;AACnD,wEAAwE;AACxE,mFAAmF;AACnF,4BAA4B;AAC5B,QAAQ;AAER,kBAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"dramacool.js","sourceRoot":"","sources":["../../../src/providers/movies/dramacool.ts"],"names":[],"mappings":";;;;;AAAA,qCAA+B;AAC/B,kDAA0B;AAE1B,yCASsB;AACtB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AC;CAoDF;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/providers/movies/index.d.ts b/dist/providers/movies/index.d.ts index 45877d951..8f29a4e39 100644 --- a/dist/providers/movies/index.d.ts +++ b/dist/providers/movies/index.d.ts @@ -1,17 +1,19 @@ -import FlixHQ from './flixhq'; -import ViewAsian from './viewAsian'; import DramaCool from './dramacool'; +import FlixHQ from './flixhq'; import Fmovies from './fmovies'; import Goku from './goku'; +import KissAsian from './kissasian'; import MovieHdWatch from './movidhdwatch'; import SmashyStream from './smashystream'; +import ViewAsian from './viewAsian'; declare const _default: { - FlixHQ: typeof FlixHQ; - ViewAsian: typeof ViewAsian; DramaCool: typeof DramaCool; + FlixHQ: typeof FlixHQ; Fmovies: typeof Fmovies; Goku: typeof Goku; + KissAsian: typeof KissAsian; MovieHdWatch: typeof MovieHdWatch; SmashyStream: typeof SmashyStream; + ViewAsian: typeof ViewAsian; }; export default _default; diff --git a/dist/providers/movies/index.js b/dist/providers/movies/index.js index 2d0a81be8..8868a6fb8 100644 --- a/dist/providers/movies/index.js +++ b/dist/providers/movies/index.js @@ -3,12 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -const flixhq_1 = __importDefault(require("./flixhq")); -const viewAsian_1 = __importDefault(require("./viewAsian")); const dramacool_1 = __importDefault(require("./dramacool")); +const flixhq_1 = __importDefault(require("./flixhq")); const fmovies_1 = __importDefault(require("./fmovies")); const goku_1 = __importDefault(require("./goku")); +const kissasian_1 = __importDefault(require("./kissasian")); const movidhdwatch_1 = __importDefault(require("./movidhdwatch")); const smashystream_1 = __importDefault(require("./smashystream")); -exports.default = { FlixHQ: flixhq_1.default, ViewAsian: viewAsian_1.default, DramaCool: dramacool_1.default, Fmovies: fmovies_1.default, Goku: goku_1.default, MovieHdWatch: movidhdwatch_1.default, SmashyStream: smashystream_1.default }; +const viewAsian_1 = __importDefault(require("./viewAsian")); +exports.default = { DramaCool: dramacool_1.default, FlixHQ: flixhq_1.default, Fmovies: fmovies_1.default, Goku: goku_1.default, KissAsian: kissasian_1.default, MovieHdWatch: movidhdwatch_1.default, SmashyStream: smashystream_1.default, ViewAsian: viewAsian_1.default }; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/providers/movies/index.js.map b/dist/providers/movies/index.js.map index a9dfb6c18..e6aafd04a 100644 --- a/dist/providers/movies/index.js.map +++ b/dist/providers/movies/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/movies/index.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8B;AAC9B,4DAAoC;AACpC,4DAAoC;AACpC,wDAAgC;AAChC,kDAA0B;AAC1B,kEAA0C;AAC1C,kEAA0C;AAE1C,kBAAe,EAAE,MAAM,EAAN,gBAAM,EAAE,SAAS,EAAT,mBAAS,EAAE,SAAS,EAAT,mBAAS,EAAE,OAAO,EAAP,iBAAO,EAAE,IAAI,EAAJ,cAAI,EAAE,YAAY,EAAZ,sBAAY,EAAE,YAAY,EAAZ,sBAAY,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/movies/index.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AACpC,sDAA8B;AAC9B,wDAAgC;AAChC,kDAA0B;AAC1B,4DAAoC;AACpC,kEAA0C;AAC1C,kEAA0C;AAC1C,4DAAoC;AAEpC,kBAAe,EAAE,SAAS,EAAT,mBAAS,EAAE,MAAM,EAAN,gBAAM,EAAE,OAAO,EAAP,iBAAO,EAAE,IAAI,EAAJ,cAAI,EAAE,SAAS,EAAT,mBAAS,EAAE,YAAY,EAAZ,sBAAY,EAAE,YAAY,EAAZ,sBAAY,EAAE,SAAS,EAAT,mBAAS,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/providers/movies/kissasian.d.ts b/dist/providers/movies/kissasian.d.ts new file mode 100644 index 000000000..be8e8c2ef --- /dev/null +++ b/dist/providers/movies/kissasian.d.ts @@ -0,0 +1,13 @@ +import { MovieParser, TvType, IMovieInfo, IEpisodeServer, StreamingServers, ISource, IMovieResult, ISearch } from '../../models'; +declare class KissAsian extends MovieParser { + readonly name = "KissAsian"; + protected baseUrl: string; + protected logo: string; + protected classPath: string; + supportedTypes: Set; + search: (query: string, page?: number) => Promise>; + fetchMediaInfo: (mediaId: string) => Promise; + fetchEpisodeServers(episodeId: string): Promise; + fetchEpisodeSources: (episodeId: string, server?: StreamingServers) => Promise; +} +export default KissAsian; diff --git a/dist/providers/movies/kissasian.js b/dist/providers/movies/kissasian.js new file mode 100644 index 000000000..8d6e6f254 --- /dev/null +++ b/dist/providers/movies/kissasian.js @@ -0,0 +1,207 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const axios_1 = __importDefault(require("axios")); +const cheerio_1 = require("cheerio"); +const models_1 = require("../../models"); +const extractors_1 = require("../../extractors"); +class KissAsian extends models_1.MovieParser { + constructor() { + super(...arguments); + this.name = 'KissAsian'; + this.baseUrl = 'https://kissasian.mx'; + this.logo = 'https://kissasian.mx/Content/images/logo.png'; + this.classPath = 'MOVIES.KissAsian'; + this.supportedTypes = new Set([models_1.TvType.MOVIE, models_1.TvType.TVSERIES]); + this.search = async (query, page = 1) => { + try { + const searchResult = { + currentPage: page, + hasNextPage: false, + results: [], + }; + const response = await axios_1.default.post(`${this.baseUrl}/Search/Drama`, `keyword=${query.replace(/[\W_]+/g, '-')}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + const $ = (0, cheerio_1.load)(response.data); + $('div.item-list > div.list').each((i, el) => { + var _a; + searchResult.results.push({ + id: (_a = $(el).find('div.info > p > a').attr('href')) === null || _a === void 0 ? void 0 : _a.slice(1), + title: $(el).find('div.info > p > a').text().trim(), + url: `${this.baseUrl}${$(el).find('div.info > p > a').attr('href')}`, + image: `${this.baseUrl}${$(el).find('div.cover > a > img').attr('src')}`, + }); + }); + if (searchResult.results.length === 0) { + searchResult.results.push({ + id: response.request.res.responseUrl.replace(/https?:\/\/[^\/]*\/?/i, ''), + title: $('div.content').first().find('div.heading > h3').text().trim(), + url: response.request.res.responseUrl, + image: `${this.baseUrl}${$('div.content').first().find('div.cover > img').attr('src')}`, + }); + } + return searchResult; + } + catch (err) { + throw new Error(err.message); + } + }; + this.fetchMediaInfo = async (mediaId) => { + var _a, _b; + try { + const realMediaId = mediaId; + if (!mediaId.startsWith(this.baseUrl)) + mediaId = `${this.baseUrl}/${mediaId}`; + const mediaInfo = { + id: '', + title: '', + }; + const { data } = await axios_1.default.post(mediaId, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + const $ = (0, cheerio_1.load)(data); + mediaInfo.id = realMediaId; + mediaInfo.title = $('div.content').first().find('div.heading > h3').text().trim(); + mediaInfo.image = `${this.baseUrl}${$('div.content').first().find('div.cover > img').attr('src')}`; + mediaInfo.otherNames = $('span:contains(Other name:)') + .siblings() + .map((i, el) => $(el).text().trim()) + .get(); + mediaInfo.description = $('div.summary1 > p').text().trim(); + mediaInfo.releaseDate = (_a = $('span:contains(Date aired:)') + .parent() + .text() + .split('Date aired:') + .pop()) === null || _a === void 0 ? void 0 : _a.replace(/\t/g, '').replace(/\n/g, '').trim(); + mediaInfo.genre = $('span:contains(Genres:)') + .siblings('a') + .map((i, el) => $(el).text().trim()) + .get(); + mediaInfo.country = $('span:contains(Country:)').siblings('a').text().trim(); + switch ((_b = $('span:contains(Status:)').parent().text().split('Status:').pop()) === null || _b === void 0 ? void 0 : _b.trim()) { + case 'Ongoing': + mediaInfo.status = models_1.MediaStatus.ONGOING; + break; + case 'Completed': + mediaInfo.status = models_1.MediaStatus.COMPLETED; + break; + case 'Cancelled': + mediaInfo.status = models_1.MediaStatus.CANCELLED; + break; + case 'Unknown': + mediaInfo.status = models_1.MediaStatus.UNKNOWN; + break; + default: + mediaInfo.status = models_1.MediaStatus.UNKNOWN; + break; + } + mediaInfo.episodes = []; + $('ul.list li.episodeSub').each((i, el) => { + var _a, _b, _c, _d; + (_a = mediaInfo.episodes) === null || _a === void 0 ? void 0 : _a.push({ + id: (_b = $(el).find('a').attr('href')) === null || _b === void 0 ? void 0 : _b.slice(1), + title: $(el).find('a').text().trim(), + episode: (_d = (_c = $(el).find('a').text()) === null || _c === void 0 ? void 0 : _c.split('Episode').pop()) === null || _d === void 0 ? void 0 : _d.trim(), + url: `${this.baseUrl}${$(el).find('a').attr('href')}`, + }); + }); + mediaInfo.episodes.reverse(); + return mediaInfo; + } + catch (err) { + throw new Error(err.message); + } + }; + this.fetchEpisodeSources = async (episodeId, server = models_1.StreamingServers.Mp4Upload) => { + if (episodeId.startsWith('http')) { + const serverUrl = new URL(episodeId); + switch (server) { + case models_1.StreamingServers.VidMoly: + return { + sources: await new extractors_1.VidMoly().extract(serverUrl), + }; + case models_1.StreamingServers.StreamWish: + return { + sources: await new extractors_1.StreamWish().extract(serverUrl), + }; + case models_1.StreamingServers.Mp4Upload: + return { + sources: await new extractors_1.Mp4Upload().extract(serverUrl), + }; + default: + throw new Error('Server not supported'); + } + } + try { + const servers = await this.fetchEpisodeServers(episodeId); + const i = servers.findIndex(s => s.name.toLowerCase() === server.toLowerCase()); + if (i === -1) { + throw new Error(`Server ${server} not found`); + } + const serverUrl = new URL(servers.filter(s => s.name.toLowerCase() === server.toLowerCase())[0].url); + return await this.fetchEpisodeSources(serverUrl.href, server); + } + catch (err) { + throw new Error(err.message); + } + }; + } + async fetchEpisodeServers(episodeId) { + try { + const episodeServers = []; + const { data } = await axios_1.default.post(`${this.baseUrl}/${episodeId}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + const $ = (0, cheerio_1.load)(data); + episodeServers.push({ + name: $('ul.mirrorTab > li > a.actived').text().trim(), + url: $('iframe#mVideo').attr('src'), + }); + await Promise.all($('ul.mirrorTab > li > a.ign').map(async (i, ele) => { + const { data } = await axios_1.default.post(`${this.baseUrl}${$(ele).attr('href')}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + const $$ = (0, cheerio_1.load)(data); + if ($$('ul.mirrorTab > li > a.actived').text().trim()) { + const url = $$('iframe#mVideo').attr('src'); + episodeServers.push({ + name: $$('ul.mirrorTab > li > a.actived').text().trim(), + url: url.startsWith('https') ? url : url.replace('//', 'https://'), + }); + } + })); + episodeServers.map(element => { + switch (element.name) { + case 'VM': + element.name = models_1.StreamingServers.VidMoly; + break; + case 'SW': + element.name = models_1.StreamingServers.StreamWish; + break; + case 'MP': + element.name = models_1.StreamingServers.Mp4Upload; + break; + default: + break; + } + }); + return episodeServers; + } + catch (err) { + throw new Error(err.message); + } + } +} +exports.default = KissAsian; +//# sourceMappingURL=kissasian.js.map \ No newline at end of file diff --git a/dist/providers/movies/kissasian.js.map b/dist/providers/movies/kissasian.js.map new file mode 100644 index 000000000..5c263b546 --- /dev/null +++ b/dist/providers/movies/kissasian.js.map @@ -0,0 +1 @@ +{"version":3,"file":"kissasian.js","sourceRoot":"","sources":["../../../src/providers/movies/kissasian.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,qCAA+B;AAE/B,yCAUsB;AACtB,iDAAkE;AAClE,MAAM,SAAU,SAAQ,oBAAW;IAAnC;;QACoB,SAAI,GAAG,WAAW,CAAC;QAClB,YAAO,GAAG,sBAAsB,CAAC;QACjC,SAAI,GAAG,8CAA8C,CAAC;QACtD,cAAS,GAAG,kBAAkB,CAAC;QACzC,mBAAc,GAAG,IAAI,GAAG,CAAC,CAAC,eAAM,CAAC,KAAK,EAAE,eAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE1D,WAAM,GAAG,KAAK,EAAE,KAAa,EAAE,OAAe,CAAC,EAAkC,EAAE;YAC1F,IAAI;gBACF,MAAM,YAAY,GAA0B;oBAC1C,WAAW,EAAE,IAAI;oBACjB,WAAW,EAAE,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CAAC,OAAO,CAAC,CAAC;SACzC;IACH,CAAC;CA2CF;AAED,kBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/utils/index.d.ts b/dist/utils/index.d.ts index a421d7afe..ed2fbd599 100644 --- a/dist/utils/index.d.ts +++ b/dist/utils/index.d.ts @@ -1,5 +1,5 @@ -import { GogoCDN, StreamSB, VidCloud, MixDrop, Kwik, RapidCloud, StreamTape, VizCloud, Filemoon, BilibiliExtractor, AsianLoad, SmashyStream } from '../extractors'; +import { GogoCDN, StreamSB, VidCloud, MixDrop, Kwik, RapidCloud, StreamTape, VizCloud, Filemoon, BilibiliExtractor, AsianLoad, SmashyStream, StreamHub, VidMoly } from '../extractors'; import { USER_AGENT, splitAuthor, floorID, formatTitle, genElement, capitalizeFirstLetter, range, getDays, days, isJson, convertDuration, substringAfter, substringBefore, compareTwoStrings } from './utils'; import { anilistSearchQuery, anilistMediaDetailQuery, kitsuSearchQuery, anilistTrendingQuery, anilistPopularQuery, anilistAiringScheduleQuery, anilistGenresQuery, anilistAdvancedQuery, anilistSiteStatisticsQuery, anilistCharacterQuery } from './queries'; import { parsePostInfo } from './getComics'; -export { USER_AGENT, GogoCDN, StreamSB, SmashyStream, splitAuthor, floorID, formatTitle, parsePostInfo, genElement, capitalizeFirstLetter, VidCloud, MixDrop, Kwik, anilistSearchQuery, anilistMediaDetailQuery, kitsuSearchQuery, range, RapidCloud, StreamTape, VizCloud, anilistTrendingQuery, anilistPopularQuery, anilistAiringScheduleQuery, anilistGenresQuery, anilistAdvancedQuery, anilistSiteStatisticsQuery, Filemoon, anilistCharacterQuery, getDays, days, isJson, convertDuration, BilibiliExtractor, AsianLoad, substringAfter, substringBefore, compareTwoStrings, }; +export { USER_AGENT, GogoCDN, StreamSB, SmashyStream, StreamHub, splitAuthor, floorID, formatTitle, parsePostInfo, genElement, capitalizeFirstLetter, VidCloud, MixDrop, Kwik, anilistSearchQuery, anilistMediaDetailQuery, kitsuSearchQuery, range, RapidCloud, StreamTape, VizCloud, anilistTrendingQuery, anilistPopularQuery, anilistAiringScheduleQuery, anilistGenresQuery, anilistAdvancedQuery, anilistSiteStatisticsQuery, Filemoon, anilistCharacterQuery, getDays, days, isJson, convertDuration, BilibiliExtractor, AsianLoad, substringAfter, substringBefore, compareTwoStrings, VidMoly, }; diff --git a/dist/utils/index.js b/dist/utils/index.js index f05fb0d4b..10a836a79 100644 --- a/dist/utils/index.js +++ b/dist/utils/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.compareTwoStrings = exports.substringBefore = exports.substringAfter = exports.AsianLoad = exports.BilibiliExtractor = exports.convertDuration = exports.isJson = exports.days = exports.getDays = exports.anilistCharacterQuery = exports.Filemoon = exports.anilistSiteStatisticsQuery = exports.anilistAdvancedQuery = exports.anilistGenresQuery = exports.anilistAiringScheduleQuery = exports.anilistPopularQuery = exports.anilistTrendingQuery = exports.VizCloud = exports.StreamTape = exports.RapidCloud = exports.range = exports.kitsuSearchQuery = exports.anilistMediaDetailQuery = exports.anilistSearchQuery = exports.Kwik = exports.MixDrop = exports.VidCloud = exports.capitalizeFirstLetter = exports.genElement = exports.parsePostInfo = exports.formatTitle = exports.floorID = exports.splitAuthor = exports.SmashyStream = exports.StreamSB = exports.GogoCDN = exports.USER_AGENT = void 0; +exports.VidMoly = exports.compareTwoStrings = exports.substringBefore = exports.substringAfter = exports.AsianLoad = exports.BilibiliExtractor = exports.convertDuration = exports.isJson = exports.days = exports.getDays = exports.anilistCharacterQuery = exports.Filemoon = exports.anilistSiteStatisticsQuery = exports.anilistAdvancedQuery = exports.anilistGenresQuery = exports.anilistAiringScheduleQuery = exports.anilistPopularQuery = exports.anilistTrendingQuery = exports.VizCloud = exports.StreamTape = exports.RapidCloud = exports.range = exports.kitsuSearchQuery = exports.anilistMediaDetailQuery = exports.anilistSearchQuery = exports.Kwik = exports.MixDrop = exports.VidCloud = exports.capitalizeFirstLetter = exports.genElement = exports.parsePostInfo = exports.formatTitle = exports.floorID = exports.splitAuthor = exports.StreamHub = exports.SmashyStream = exports.StreamSB = exports.GogoCDN = exports.USER_AGENT = void 0; const extractors_1 = require("../extractors"); Object.defineProperty(exports, "GogoCDN", { enumerable: true, get: function () { return extractors_1.GogoCDN; } }); Object.defineProperty(exports, "StreamSB", { enumerable: true, get: function () { return extractors_1.StreamSB; } }); @@ -14,6 +14,8 @@ Object.defineProperty(exports, "Filemoon", { enumerable: true, get: function () Object.defineProperty(exports, "BilibiliExtractor", { enumerable: true, get: function () { return extractors_1.BilibiliExtractor; } }); Object.defineProperty(exports, "AsianLoad", { enumerable: true, get: function () { return extractors_1.AsianLoad; } }); Object.defineProperty(exports, "SmashyStream", { enumerable: true, get: function () { return extractors_1.SmashyStream; } }); +Object.defineProperty(exports, "StreamHub", { enumerable: true, get: function () { return extractors_1.StreamHub; } }); +Object.defineProperty(exports, "VidMoly", { enumerable: true, get: function () { return extractors_1.VidMoly; } }); const utils_1 = require("./utils"); Object.defineProperty(exports, "USER_AGENT", { enumerable: true, get: function () { return utils_1.USER_AGENT; } }); Object.defineProperty(exports, "splitAuthor", { enumerable: true, get: function () { return utils_1.splitAuthor; } }); diff --git a/dist/utils/index.js.map b/dist/utils/index.js.map index bec470f35..90f0444c5 100644 --- a/dist/utils/index.js.map +++ b/dist/utils/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,8CAauB;AAiCrB,wFA7CA,oBAAO,OA6CA;AACP,yFA7CA,qBAAQ,OA6CA;AAQR,yFApDA,qBAAQ,OAoDA;AACR,wFApDA,oBAAO,OAoDA;AACP,qFApDA,iBAAI,OAoDA;AAKJ,2FAxDA,uBAAU,OAwDA;AACV,2FAxDA,uBAAU,OAwDA;AACV,yFAxDA,qBAAQ,OAwDA;AAOR,yFA9DA,qBAAQ,OA8DA;AAMR,kGAnEA,8BAAiB,OAmEA;AACjB,0FAnEA,sBAAS,OAmEA;AA9BT,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AsCA;AACZ,0FAtCA,sBAAS,OAsCA;AAkCT,wFAvEA,oBAAO,OAuEA;AArET,mCAeiB;AAgBf,2FA9BA,kBAAU,OA8BA;AAKV,4FAlCA,mBAAW,OAkCA;AACX,wFAlCA,eAAO,OAkCA;AACP,4FAlCA,mBAAW,OAkCA;AAEX,2FAnCA,kBAAU,OAmCA;AACV,sGAnCA,6BAAqB,OAmCA;AAOrB,sFAzCA,aAAK,OAyCA;AAYL,wFApDA,eAAO,OAoDA;AACP,qFApDA,YAAI,OAoDA;AACJ,uFApDA,cAAM,OAoDA;AACN,gGApDA,uBAAe,OAoDA;AAGf,+FAtDA,sBAAc,OAsDA;AACd,gGAtDA,uBAAe,OAsDA;AACf,kGAtDA,yBAAiB,OAsDA;AApDnB,uCAWmB;AAkBjB,mGA5BA,4BAAkB,OA4BA;AAClB,wGA5BA,iCAAuB,OA4BA;AACvB,iGA5BA,0BAAgB,OA4BA;AAKhB,qGAhCA,8BAAoB,OAgCA;AACpB,oGAhCA,6BAAmB,OAgCA;AACnB,2GAhCA,oCAA0B,OAgCA;AAC1B,mGAhCA,4BAAkB,OAgCA;AAClB,qGAhCA,8BAAoB,OAgCA;AACpB,2GAhCA,oCAA0B,OAgCA;AAE1B,sGAjCA,+BAAqB,OAiCA;AA/BvB,2CAA4C;AAW1C,8FAXO,yBAAa,OAWP"} \ No newline at end of file diff --git a/dist/utils/providers-list.d.ts b/dist/utils/providers-list.d.ts index 63fe3d4c7..ccba7f1a6 100644 --- a/dist/utils/providers-list.d.ts +++ b/dist/utils/providers-list.d.ts @@ -9,7 +9,7 @@ export declare const PROVIDERS_LIST: { BOOKS: import("../providers/books/libgen").default[]; COMICS: import("../providers/comics/getComics").default[]; LIGHT_NOVELS: import("../providers/light-novels/readlightnovels").default[]; - MOVIES: (import("../providers/movies/flixhq").default | import("../providers/movies/viewAsian").default | import("../providers/movies/dramacool").default | import("../providers/movies/fmovies").default | import("../providers/movies/goku").default | import("../providers/movies/movidhdwatch").default)[]; + MOVIES: (import("../providers/movies/dramacool").default | import("../providers/movies/flixhq").default | import("../providers/movies/fmovies").default | import("../providers/movies/goku").default | import("../providers/movies/kissasian").default | import("../providers/movies/movidhdwatch").default | import("../providers/movies/viewAsian").default)[]; NEWS: import("../providers/news/animenewsnetwork").default[]; META: (import("../providers/meta/anilist").default | import("../providers/meta/mal").default | import("../providers/meta/tmdb").default)[]; OTHERS: never[]; diff --git a/dist/utils/providers-list.js b/dist/utils/providers-list.js index db851a554..54d259a2a 100644 --- a/dist/utils/providers-list.js +++ b/dist/utils/providers-list.js @@ -36,12 +36,13 @@ exports.PROVIDERS_LIST = { COMICS: [new providers_1.COMICS.GetComics()], LIGHT_NOVELS: [new providers_1.LIGHT_NOVELS.ReadLightNovels()], MOVIES: [ - new providers_1.MOVIES.FlixHQ(), - new providers_1.MOVIES.ViewAsian(), new providers_1.MOVIES.DramaCool(), + new providers_1.MOVIES.FlixHQ(), new providers_1.MOVIES.Fmovies(), new providers_1.MOVIES.Goku(), + new providers_1.MOVIES.KissAsian(), new providers_1.MOVIES.MovieHdWatch(), + new providers_1.MOVIES.ViewAsian(), ], NEWS: [new providers_1.NEWS.ANN()], META: [new providers_1.META.Anilist(), new providers_1.META.TMDB(), new providers_1.META.Myanimelist()], diff --git a/dist/utils/providers-list.js.map b/dist/utils/providers-list.js.map index 494cfcb85..a1d667204 100644 --- a/dist/utils/providers-list.js.map +++ b/dist/utils/providers-list.js.map @@ -1 +1 @@ -{"version":3,"file":"providers-list.js","sourceRoot":"","sources":["../../src/utils/providers-list.ts"],"names":[],"mappings":";;;AAAA,4CAA6F;AAE7F;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAE;QACL,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,QAAQ,EAAE;QACpB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,QAAQ,EAAE;QACpB,IAAI,iBAAK,CAAC,WAAW,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AM,EAAE,EAAE;CACX,CAAC"} \ No newline at end of file +{"version":3,"file":"providers-list.js","sourceRoot":"","sources":["../../src/utils/providers-list.ts"],"names":[],"mappings":";;;AAAA,4CAA6F;AAE7F;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAE;QACL,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,QAAQ,EAAE;QACpB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,QAAQ,EAAE;QACpB,IAAI,iBAAK,CAAC,WAAW,EAAE;QACvB,IAAI,iBAAK,CAAC,KAAK,EAAE;QACjB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,IAAI,EAAE;QAChB,IAAI,iBAAK,CAAC,KAAK,EAAE;KAClB;IACD,KAAK,EAAE;QACL,IAAI,iBAAK,CAAC,QAAQ,EAAE;QACpB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,YAAY,EAAE;QACxB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,WAAW,EAAE;QACvB,IAAI,iBAAK,CAAC,WAAW,EAAE;QACvB,IAAI,iBAAK,CAAC,MAAM,EAAE;QAClB,IAAI,iBAAK,CAAC,UAAU,EAAE;QACtB,IAAI,iBAAK,CAAC,SAAS,EAAE;QACrB,IAAI,iBAAK,CAAC,QAAQ,EAAE;KACrB;IACD,KAAK,EAAE,CAAC,IAAI,iBAAK,CAAC,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,CAAC,IAAI,kBAAM,CAAC,SAAS,EAAE,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,wBAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE;QACN,IAAI,kBAAM,CAAC,SAAS,EAAE;QACtB,IAAI,kBAAM,CAAC,MAAM,EAAE;QACnB,IAAI,kBAAM,CAAC,OAAO,EAAE;QACpB,IAAI,kBAAM,CAAC,IAAI,EAAE;QACjB,IAAI,kBAAM,CAAC,SAAS,EAAE;QACtB,IAAI,kBAAM,CAAC,YAAY,EAAE;QACzB,IAAI,kBAAM,CAAC,SAAS,EAAE;KACvB;IACD,IAAI,EAAE,CAAC,IAAI,gBAAI,CAAC,GAAG,EAAE,CAAC;IACtB,IAAI,EAAE,CAAC,IAAI,gBAAI,CAAC,OAAO,EAAE,EAAE,IAAI,gBAAI,CAAC,IAAI,EAAE,EAAE,IAAI,gBAAI,CAAC,WAAW,EAAE,CAAC;IACnE,MAAM,EAAE,EAAE;CACX,CAAC"} \ No newline at end of file diff --git a/src/extractors/index.ts b/src/extractors/index.ts index d39f057da..24f8bd2f6 100644 --- a/src/extractors/index.ts +++ b/src/extractors/index.ts @@ -1,31 +1,37 @@ +import AsianLoad from './asianload'; +import BilibiliExtractor from './bilibili'; +import Filemoon from './filemoon'; import GogoCDN from './gogocdn'; -import StreamSB from './streamsb'; -import VidCloud from './vidcloud'; -import MixDrop from './mixdrop'; import Kwik from './kwik'; +import MixDrop from './mixdrop'; +import Mp4Upload from './mp4upload'; import RapidCloud from './rapidcloud'; -import StreamTape from './streamtape'; -import VizCloud from './vizcloud'; -import Filemoon from './filemoon'; -import BilibiliExtractor from './bilibili'; -import AsianLoad from './asianload'; -import StreamLare from './streamlare'; import SmashyStream from './smashystream'; import StreamHub from './streamhub'; +import StreamLare from './streamlare'; +import StreamSB from './streamsb'; +import StreamTape from './streamtape'; +import StreamWish from './streamwish'; +import VidCloud from './vidcloud'; +import VidMoly from './vidmoly'; +import VizCloud from './vizcloud'; export { + AsianLoad, + BilibiliExtractor, + Filemoon, GogoCDN, - StreamSB, - VidCloud, - MixDrop, Kwik, + MixDrop, + Mp4Upload, RapidCloud, - StreamTape, - VizCloud, - Filemoon, - BilibiliExtractor, - AsianLoad, + SmashyStream, StreamHub, StreamLare, - SmashyStream, + StreamSB, + StreamTape, + StreamWish, + VidCloud, + VidMoly, + VizCloud, }; diff --git a/src/extractors/mp4upload.ts b/src/extractors/mp4upload.ts new file mode 100644 index 000000000..1c73b3651 --- /dev/null +++ b/src/extractors/mp4upload.ts @@ -0,0 +1,30 @@ +import axios from 'axios'; + +import { VideoExtractor, IVideo } from '../models'; + +class Mp4Upload extends VideoExtractor { + protected override serverName = 'mp4upload'; + protected override sources: IVideo[] = []; + + override extract = async (videoUrl: URL): Promise => { + try { + const { data } = await axios.get(videoUrl.href); + + const playerSrc = data.match(/(?<=player\.src\()\s*{\s*type:\s*"[^"]+",\s*src:\s*"([^"]+)"\s*}\s*(?=\);)/s); + const streamUrl = playerSrc[1]; + + if (!streamUrl) throw new Error("Stream url not found"); + + this.sources.push({ + quality: 'auto', + url: streamUrl, + isM3U8: streamUrl.includes('.m3u8'), + }); + + return this.sources; + } catch (err) { + throw new Error((err as Error).message); + } + }; +} +export default Mp4Upload; diff --git a/src/extractors/streamhub.ts b/src/extractors/streamhub.ts index c603a24a4..620bff4c0 100644 --- a/src/extractors/streamhub.ts +++ b/src/extractors/streamhub.ts @@ -1,5 +1,4 @@ import axios from 'axios'; -import { load } from 'cheerio'; import { VideoExtractor, IVideo, ISubtitle } from '../models'; @@ -18,11 +17,7 @@ class StreamHub extends VideoExtractor { throw new Error('Video not found'); }); - const $ = load(data); - const ss = $.html().indexOf('eval(function(p,a,c,k,e,d)'); - const se = $.html().indexOf('', ss); - const s = $.html().substring(ss, se).replace('eval', ''); - const unpackedData = eval(s) as string; + const unpackedData = eval(/(eval)(\(f.*?)(\n<\/script>)/s.exec(data)![2].replace('eval', '')); const links = unpackedData.match(new RegExp('sources:\\[\\{src:"(.*?)"')) ?? []; const m3u8Content = await axios.get(links[1], { diff --git a/src/extractors/streamwish.ts b/src/extractors/streamwish.ts new file mode 100644 index 000000000..fa2398410 --- /dev/null +++ b/src/extractors/streamwish.ts @@ -0,0 +1,50 @@ +import axios from 'axios'; + +import { VideoExtractor, IVideo } from '../models'; + +class StreamWish extends VideoExtractor { + protected override serverName = 'streamwish'; + protected override sources: IVideo[] = []; + + override extract = async (videoUrl: URL): Promise => { + try { + const { data } = await axios.get(videoUrl.href); + + const unPackagedData = eval(/(eval)(\(f.*?)(\n<\/script>)/s.exec(data)![2]); + const links = unPackagedData.match(/file:\s*"([^"]+)"/); + + this.sources.push({ + quality: 'auto', + url: links[1], + isM3U8: links[1].includes('.m3u8'), + }); + + const m3u8Content = await axios.get(links[1], { + headers: { + Referer: videoUrl.href, + }, + }); + + if (m3u8Content.data.includes('EXTM3U')) { + const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); + for (const video of videoList ?? []) { + if (!video.includes('m3u8')) continue; + + const url = links[1].split('master.m3u8')[0] + video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split(',')[0].split('x')[1]; + + this.sources.push({ + url: url, + quality: `${quality}`, + isM3U8: url.includes('.m3u8'), + }); + } + } + + return this.sources; + } catch (err) { + throw new Error((err as Error).message); + } + }; +} +export default StreamWish; diff --git a/src/extractors/vidmoly.ts b/src/extractors/vidmoly.ts new file mode 100644 index 000000000..2d54e4b2c --- /dev/null +++ b/src/extractors/vidmoly.ts @@ -0,0 +1,49 @@ +import axios from 'axios'; + +import { VideoExtractor, IVideo } from '../models'; + +class VidMoly extends VideoExtractor { + protected override serverName = 'vidmoly'; + protected override sources: IVideo[] = []; + + override extract = async (videoUrl: URL): Promise => { + try { + const { data } = await axios.get(videoUrl.href); + + const links = data.match(/file:\s*"([^"]+)"/); + + const m3u8Content = await axios.get(links[1], { + headers: { + Referer: videoUrl.href, + }, + }); + + this.sources.push({ + quality: 'auto', + url: links[1], + isM3U8: links[1].includes('.m3u8'), + }); + + if (m3u8Content.data.includes('EXTM3U')) { + const videoList = m3u8Content.data.split('#EXT-X-STREAM-INF:'); + for (const video of videoList ?? []) { + if (!video.includes('m3u8')) continue; + + const url = video.split('\n')[1]; + const quality = video.split('RESOLUTION=')[1].split(',')[0].split('x')[1]; + + this.sources.push({ + url: url, + quality: `${quality}`, + isM3U8: url.includes('.m3u8'), + }); + } + } + + return this.sources; + } catch (err) { + throw new Error((err as Error).message); + } + }; +} +export default VidMoly; diff --git a/src/index.ts b/src/index.ts index d85aa0fb3..dfe8147b7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,7 +14,10 @@ import { VidCloud, StreamLare, StreamHub, - SmashyStream + SmashyStream, + VidMoly, + Mp4Upload, + StreamWish, } from './extractors'; import { IProviderStats, @@ -104,7 +107,10 @@ export { StreamHub, SmashyStream, VizCloud, - Filemoon, - BilibiliExtractor, AsianLoad, + BilibiliExtractor, + Filemoon, + Mp4Upload, + StreamWish, + VidMoly, }; diff --git a/src/models/types.ts b/src/models/types.ts index f02faa3c6..c524219cf 100644 --- a/src/models/types.ts +++ b/src/models/types.ts @@ -162,6 +162,7 @@ export enum StreamingServers { GogoCDN = 'gogocdn', StreamSB = 'streamsb', MixDrop = 'mixdrop', + Mp4Upload = 'mp4upload', UpCloud = 'upcloud', VidCloud = 'vidcloud', StreamTape = 'streamtape', @@ -171,6 +172,9 @@ export enum StreamingServers { Filemoon = 'filemoon', VidStreaming = 'vidstreaming', SmashyStream = 'smashystream', + StreamHub = 'streamhub', + StreamWish = 'streamwish', + VidMoly = 'vidmoly', } export enum MediaStatus { diff --git a/src/providers/movies/dramacool.ts b/src/providers/movies/dramacool.ts index 54d9e17bc..66cbf8158 100644 --- a/src/providers/movies/dramacool.ts +++ b/src/providers/movies/dramacool.ts @@ -15,24 +15,23 @@ import { MixDrop, AsianLoad, StreamTape, StreamSB } from '../../extractors'; class DramaCool extends MovieParser { override readonly name = 'DramaCool'; - protected override baseUrl = 'https://www1.dramacool.cr'; + protected override baseUrl = 'https://dramacool.hr'; protected override logo = 'https://play-lh.googleusercontent.com/IaCb2JXII0OV611MQ-wSA8v_SAs9XF6E3TMDiuxGGXo4wp9bI60GtDASIqdERSTO5XU'; protected override classPath = 'MOVIES.DramaCool'; override supportedTypes = new Set([TvType.MOVIE, TvType.TVSERIES]); override search = async (query: string, page: number = 1): Promise> => { - const searchResult: ISearch = { - currentPage: page, - hasNextPage: false, - results: [], - }; - try { + const searchResult: ISearch = { + currentPage: page, + hasNextPage: false, + results: [], + }; + const { data } = await axios.get( `${this.baseUrl}/search?keyword=${query.replace(/[\W_]+/g, '-')}&page=${page}` ); - const $ = load(data); const navSelector = 'ul.pagination'; @@ -55,16 +54,16 @@ class DramaCool extends MovieParser { }; override fetchMediaInfo = async (mediaId: string): Promise => { - const realMediaId = mediaId; - if (!mediaId.startsWith(this.baseUrl)) mediaId = `${this.baseUrl}/${mediaId}`; - - const mediaInfo: IMovieInfo = { - id: '', - title: '', - }; try { - const { data } = await axios.get(mediaId); + const realMediaId = mediaId; + if (!mediaId.startsWith(this.baseUrl)) mediaId = `${this.baseUrl}/${mediaId}`; + const mediaInfo: IMovieInfo = { + id: '', + title: '', + }; + + const { data } = await axios.get(mediaId); const $ = load(data); mediaInfo.id = realMediaId; @@ -100,6 +99,33 @@ class DramaCool extends MovieParser { } }; + override async fetchEpisodeServers(episodeId: string, ...args: any): Promise { + try { + const episodeServers: IEpisodeServer[] = []; + + if (!episodeId.includes('.html')) episodeId = `${this.baseUrl}/${episodeId}.html`; + + const { data } = await axios.get(episodeId); + const $ = load(data); + + $('div.anime_muti_link > ul > li').map(async (i, ele) => { + const url = $(ele).attr('data-video')!; + let name = $(ele).attr('class')!.replace('selected', '').trim(); + if (name.includes('Standard')) { + name = StreamingServers.AsianLoad + } + episodeServers.push({ + name: name, + url: url.startsWith('//') ? url?.replace('//', 'https://') : url, + }); + }); + + return episodeServers; + } catch (err) { + throw new Error((err as Error).message); + } + } + override fetchEpisodeSources = async ( episodeId: string, server: StreamingServers = StreamingServers.AsianLoad @@ -128,56 +154,28 @@ class DramaCool extends MovieParser { } } - if (!episodeId.includes('.html')) episodeId = `${this.baseUrl}/${episodeId}.html`; - try { - const { data } = await axios.get(episodeId); - - const $ = load(data); + if (!episodeId.includes('.html')) episodeId = `${this.baseUrl}/${episodeId}.html`; - let serverUrl = ''; - switch (server) { - // asianload is the same as the standard server - case StreamingServers.AsianLoad: - serverUrl = `https:${$('.Standard').attr('data-video')}`; - if (!serverUrl.includes('asian')) throw new Error('Try another server'); - break; - case StreamingServers.MixDrop: - serverUrl = $('.mixdrop').attr('data-video')!; - if (!serverUrl.includes('mixdrop')) throw new Error('Try another server'); - break; - case StreamingServers.StreamTape: - serverUrl = $('.streamtape').attr('data-video')!; - if (!serverUrl.includes('streamtape')) throw new Error('Try another server'); - break; - case StreamingServers.StreamSB: - serverUrl = $('.streamsb').attr('data-video')!; - if (!serverUrl.includes('stream')) throw new Error('Try another server'); - break; + const servers = await this.fetchEpisodeServers(episodeId); + const i = servers.findIndex(s => s.name.toLowerCase() === server.toLowerCase()); + if (i === -1) { + throw new Error(`Server ${server} not found`); } + const serverUrl: URL = new URL( + servers.filter(s => s.name.toLowerCase() === server.toLowerCase())[0].url + ); - return await this.fetchEpisodeSources(serverUrl, server); + return await this.fetchEpisodeSources(serverUrl.href, server); } catch (err) { throw new Error((err as Error).message); } }; - override fetchEpisodeServers(episodeId: string, ...args: any): Promise { - throw new Error('Method not implemented.'); - } - private removeContainsFromString = (str: string, contains: string) => { contains = contains.toLowerCase(); return str.toLowerCase().replace(/\n/g, '').replace(`${contains}:`, '').trim(); }; } -// (async () => { -// const drama = new Dramacool(); -// const search = await drama.search('vincenzo'); -// const mediaInfo = await drama.fetchMediaInfo(search.results[0].id); -// // const sources = await drama.fetchEpisodeSources(mediaInfo.episodes![0].id); -// console.log(mediaInfo); -// })(); - export default DramaCool; diff --git a/src/providers/movies/index.ts b/src/providers/movies/index.ts index b91d39718..e6b748a68 100644 --- a/src/providers/movies/index.ts +++ b/src/providers/movies/index.ts @@ -1,9 +1,10 @@ -import FlixHQ from './flixhq'; -import ViewAsian from './viewAsian'; import DramaCool from './dramacool'; +import FlixHQ from './flixhq'; import Fmovies from './fmovies'; import Goku from './goku'; +import KissAsian from './kissasian'; import MovieHdWatch from './movidhdwatch'; import SmashyStream from './smashystream'; +import ViewAsian from './viewAsian'; -export default { FlixHQ, ViewAsian, DramaCool, Fmovies, Goku, MovieHdWatch, SmashyStream }; +export default { DramaCool, FlixHQ, Fmovies, Goku, KissAsian, MovieHdWatch, SmashyStream, ViewAsian }; diff --git a/src/providers/movies/kissasian.ts b/src/providers/movies/kissasian.ts new file mode 100644 index 000000000..63f8d0099 --- /dev/null +++ b/src/providers/movies/kissasian.ts @@ -0,0 +1,241 @@ +import axios from 'axios'; +import { load } from 'cheerio'; + +import { + MovieParser, + TvType, + IMovieInfo, + IEpisodeServer, + StreamingServers, + ISource, + IMovieResult, + ISearch, + MediaStatus, +} from '../../models'; +import { Mp4Upload, StreamWish, VidMoly } from '../../extractors'; +class KissAsian extends MovieParser { + override readonly name = 'KissAsian'; + protected override baseUrl = 'https://kissasian.mx'; + protected override logo = 'https://kissasian.mx/Content/images/logo.png'; + protected override classPath = 'MOVIES.KissAsian'; + override supportedTypes = new Set([TvType.MOVIE, TvType.TVSERIES]); + + override search = async (query: string, page: number = 1): Promise> => { + try { + const searchResult: ISearch = { + currentPage: page, + hasNextPage: false, + results: [], + }; + + const response = await axios.post( + `${this.baseUrl}/Search/Drama`, + `keyword=${query.replace(/[\W_]+/g, '-')}`, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + } + ); + const $ = load(response.data); + + $('div.item-list > div.list').each((i, el) => { + searchResult.results.push({ + id: $(el).find('div.info > p > a').attr('href')?.slice(1)!, + title: $(el).find('div.info > p > a').text().trim(), + url: `${this.baseUrl}${$(el).find('div.info > p > a').attr('href')}`, + image: `${this.baseUrl}${$(el).find('div.cover > a > img').attr('src')}`, + }); + }); + + if (searchResult.results.length === 0) { + searchResult.results.push({ + id: response.request.res.responseUrl.replace(/https?:\/\/[^\/]*\/?/i, ''), + title: $('div.content').first().find('div.heading > h3').text().trim(), + url: response.request.res.responseUrl, + image: `${this.baseUrl}${$('div.content').first().find('div.cover > img').attr('src')}`, + }); + } + + return searchResult; + } catch (err) { + throw new Error((err as Error).message); + } + }; + + override fetchMediaInfo = async (mediaId: string): Promise => { + try { + const realMediaId = mediaId; + if (!mediaId.startsWith(this.baseUrl)) mediaId = `${this.baseUrl}/${mediaId}`; + + const mediaInfo: IMovieInfo = { + id: '', + title: '', + }; + + const { data } = await axios.post(mediaId, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + + const $ = load(data); + + mediaInfo.id = realMediaId; + mediaInfo.title = $('div.content').first().find('div.heading > h3').text().trim(); + mediaInfo.image = `${this.baseUrl}${$('div.content').first().find('div.cover > img').attr('src')}`; + mediaInfo.otherNames = $('span:contains(Other name:)') + .siblings() + .map((i, el) => $(el).text()!.trim()) + .get(); + mediaInfo.description = $('div.summary1 > p').text().trim(); + mediaInfo.releaseDate = $('span:contains(Date aired:)') + .parent() + .text() + .split('Date aired:') + .pop() + ?.replace(/\t/g, '') + .replace(/\n/g, '') + .trim(); + mediaInfo.genre = $('span:contains(Genres:)') + .siblings('a') + .map((i, el) => $(el).text()!.trim()) + .get(); + mediaInfo.country = $('span:contains(Country:)').siblings('a').text().trim(); + + switch ($('span:contains(Status:)').parent().text().split('Status:').pop()?.trim()) { + case 'Ongoing': + mediaInfo.status = MediaStatus.ONGOING; + break; + case 'Completed': + mediaInfo.status = MediaStatus.COMPLETED; + break; + case 'Cancelled': + mediaInfo.status = MediaStatus.CANCELLED; + break; + case 'Unknown': + mediaInfo.status = MediaStatus.UNKNOWN; + break; + default: + mediaInfo.status = MediaStatus.UNKNOWN; + break; + } + + mediaInfo.episodes = []; + $('ul.list li.episodeSub').each((i, el) => { + mediaInfo.episodes?.push({ + id: $(el).find('a').attr('href')?.slice(1)!, + title: $(el).find('a').text().trim(), + episode: $(el).find('a').text()?.split('Episode').pop()?.trim(), + url: `${this.baseUrl}${$(el).find('a').attr('href')}`, + }); + }); + mediaInfo.episodes.reverse(); + + return mediaInfo; + } catch (err) { + throw new Error((err as Error).message); + } + }; + + override async fetchEpisodeServers(episodeId: string): Promise { + try { + const episodeServers: IEpisodeServer[] = []; + + const { data } = await axios.post(`${this.baseUrl}/${episodeId}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + + const $ = load(data); + episodeServers.push({ + name: $('ul.mirrorTab > li > a.actived').text().trim(), + url: $('iframe#mVideo').attr('src')!, + }); + + await Promise.all( + $('ul.mirrorTab > li > a.ign').map(async (i, ele) => { + const { data } = await axios.post(`${this.baseUrl}${$(ele).attr('href')}`, { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }); + + const $$ = load(data); + if ($$('ul.mirrorTab > li > a.actived').text().trim()) { + const url = $$('iframe#mVideo').attr('src')!; + episodeServers.push({ + name: $$('ul.mirrorTab > li > a.actived').text().trim(), + url: url.startsWith('https') ? url : url.replace('//', 'https://'), + }); + } + }) + ); + + episodeServers.map(element => { + switch (element.name) { + case 'VM': + element.name = StreamingServers.VidMoly; + break; + case 'SW': + element.name = StreamingServers.StreamWish; + break; + case 'MP': + element.name = StreamingServers.Mp4Upload; + break; + default: + break; + } + }); + + return episodeServers; + } catch (err) { + throw new Error((err as Error).message); + } + } + + override fetchEpisodeSources = async ( + episodeId: string, + server: StreamingServers = StreamingServers.Mp4Upload + ): Promise => { + if (episodeId.startsWith('http')) { + const serverUrl = new URL(episodeId); + switch (server) { + case StreamingServers.VidMoly: + return { + sources: await new VidMoly().extract(serverUrl), + }; + case StreamingServers.StreamWish: + return { + sources: await new StreamWish().extract(serverUrl), + }; + case StreamingServers.Mp4Upload: + return { + sources: await new Mp4Upload().extract(serverUrl), + }; + default: + throw new Error('Server not supported'); + } + } + + try { + const servers = await this.fetchEpisodeServers(episodeId); + const i = servers.findIndex(s => s.name.toLowerCase() === server.toLowerCase()); + + if (i === -1) { + throw new Error(`Server ${server} not found`); + } + + const serverUrl: URL = new URL( + servers.filter(s => s.name.toLowerCase() === server.toLowerCase())[0].url + ); + + return await this.fetchEpisodeSources(serverUrl.href, server); + } catch (err) { + throw new Error((err as Error).message); + } + }; +} + +export default KissAsian; diff --git a/src/utils/index.ts b/src/utils/index.ts index 646e818e6..f6dace1d6 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -10,7 +10,9 @@ import { Filemoon, BilibiliExtractor, AsianLoad, - SmashyStream + SmashyStream, + StreamHub, + VidMoly, } from '../extractors'; import { USER_AGENT, @@ -47,6 +49,7 @@ export { GogoCDN, StreamSB, SmashyStream, + StreamHub, splitAuthor, floorID, formatTitle, @@ -80,4 +83,5 @@ export { substringAfter, substringBefore, compareTwoStrings, + VidMoly, }; diff --git a/src/utils/providers-list.ts b/src/utils/providers-list.ts index f0c83f13f..c29f6b92f 100644 --- a/src/utils/providers-list.ts +++ b/src/utils/providers-list.ts @@ -34,12 +34,13 @@ export const PROVIDERS_LIST = { COMICS: [new COMICS.GetComics()], LIGHT_NOVELS: [new LIGHT_NOVELS.ReadLightNovels()], MOVIES: [ - new MOVIES.FlixHQ(), - new MOVIES.ViewAsian(), new MOVIES.DramaCool(), + new MOVIES.FlixHQ(), new MOVIES.Fmovies(), new MOVIES.Goku(), + new MOVIES.KissAsian(), new MOVIES.MovieHdWatch(), + new MOVIES.ViewAsian(), ], NEWS: [new NEWS.ANN()], META: [new META.Anilist(), new META.TMDB(), new META.Myanimelist()], diff --git a/test/movies/dramacool.test.ts b/test/movies/dramacool.test.ts index d41343a0e..ec8121228 100644 --- a/test/movies/dramacool.test.ts +++ b/test/movies/dramacool.test.ts @@ -4,19 +4,24 @@ jest.setTimeout(120000); // run: yarn test --watch --verbose false dramacool.test.ts -const dramacool = new MOVIES.DramaCool(); +const dramaCool = new MOVIES.DramaCool(); test('Search: returns a filled array of movies/TV.', async () => { - const data = await dramacool.search('Vincenzo'); + const data = await dramaCool.search('Vincenzo'); expect(data.results).not.toEqual([]); }); test('fetchMediaInfo: returns filled movie/TV info when given a mediaId.', async () => { - const data = await dramacool.fetchMediaInfo('drama-detail/vincenzo'); + const data = await dramaCool.fetchMediaInfo('drama-detail/vincenzo'); + expect(data).not.toEqual({}); +}); + +test('fetchEpisodeServers: returns filled object of streaming sources when given an episodeId.', async () => { + const data = await dramaCool.fetchEpisodeServers('vincenzo-2021-episode-1'); expect(data).not.toEqual({}); }); test('fetchEpisodeSources: returns filled object of streaming sources when given an episodeId.', async () => { - const data = await dramacool.fetchEpisodeSources('vincenzo-2021-episode-1'); + const data = await dramaCool.fetchEpisodeSources('vincenzo-2021-episode-1'); expect(data).not.toEqual({}); }); diff --git a/test/movies/kissasian.test.ts b/test/movies/kissasian.test.ts new file mode 100644 index 000000000..2f74d3821 --- /dev/null +++ b/test/movies/kissasian.test.ts @@ -0,0 +1,27 @@ +import { MOVIES } from '../../src/providers'; + +jest.setTimeout(120000); + +// run: yarn test --watch --verbose false viewasian.test.ts + +const kissAsian = new MOVIES.KissAsian(); + +test('Search: returns a filled array of movies/TV.', async () => { + const data = await kissAsian.search('vincenzo'); + expect(data.results).not.toEqual([]); +}); + +test('fetchMediaInfo: returns filled movie/TV info when given a mediaId.', async () => { + const data = await kissAsian.fetchMediaInfo('Drama/Vincenzo'); + expect(data).not.toEqual({}); +}); + +test('fetchEpisodeServers: returns filled object of streaming sources when given an episodeId.', async () => { + const data = await kissAsian.fetchEpisodeServers('Drama/Vincenzo/Episode-1?id=62565'); + expect(data).not.toEqual({}); +}); + +test('fetchEpisodeSources: returns filled object of streaming sources when given an episodeId.', async () => { + const data = await kissAsian.fetchEpisodeSources('Drama/Vincenzo/Episode-1?id=62565'); + expect(data).not.toEqual({}); +});