This commit is contained in:
Himanshu
2026-02-03 21:48:37 +05:30
parent c4d3340b16
commit a179a130d6
192 changed files with 184 additions and 192 deletions

View File

@@ -1 +1 @@
var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};exports.getStream=void 0;__awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};function gdflixExtractor(link,signal,axios,cheerio,headers){return __awaiter(this,void 0,void 0,function*(){var _a,_b,_c,_d,_f,_g,_h;try{const streamLinks=[],data=(yield axios(`${link}`,{headers:headers,signal:signal})).data;let $drive=cheerio.load(data);if(null===(_a=$drive("body").attr("onload"))||void 0===_a?void 0:_a.includes("location.replace")){const newLink=null===(_d=null===(_c=null===(_b=$drive("body").attr("onload"))||void 0===_b?void 0:_b.split("location.replace('"))||void 0===_c?void 0:_c[1].split("'"))||void 0===_d?void 0:_d[0];if(newLink){const newRes=yield axios.get(newLink,{headers:headers,signal:signal});$drive=cheerio.load(newRes.data)}}try{const baseUrl=link.split("/").slice(0,3).join("/"),resumeDrive=$drive(".btn-secondary").attr("href")||"";if(resumeDrive.includes("indexbot")){const resumeBotRes=yield axios.get(resumeDrive,{headers:headers}),resumeBotToken=resumeBotRes.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1],resumeBotBody=new FormData;resumeBotBody.append("token",resumeBotToken);const resumeBotPath=resumeBotRes.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1],resumeBotBaseUrl=resumeDrive.split("/download")[0],resumeBotDownload=yield fetch(resumeBotBaseUrl+"/download?id="+resumeBotPath,{method:"POST",body:resumeBotBody,headers:{Referer:resumeDrive,Cookie:"PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308"}}),resumeBotDownloadData=yield resumeBotDownload.json();streamLinks.push({server:"ResumeBot",link:resumeBotDownloadData.url,type:"mkv"})}else{const url=baseUrl+resumeDrive,resumeDriveHtml=(yield axios.get(url,{headers:headers})).data,resumeLink=cheerio.load(resumeDriveHtml)(".btn-success").attr("href");resumeLink&&streamLinks.push({server:"ResumeCloud",link:resumeLink,type:"mkv"})}}catch(err){}try{const seed=$drive(".btn-danger").attr("href")||"";if(seed.includes("?url=")){const instantToken=seed.split("=")[1],InstantFromData=new FormData;InstantFromData.append("keys",instantToken);const videoSeedUrl=seed.split("/").slice(0,3).join("/")+"/api",instantLinkRes=yield fetch(videoSeedUrl,{method:"POST",body:InstantFromData,headers:{"x-token":videoSeedUrl}}),instantLinkData=yield instantLinkRes.json();if(!1===instantLinkData.error){const instantLink=instantLinkData.url;streamLinks.push({server:"Gdrive-Instant",link:instantLink,type:"mkv"})}}else{const newLink=(null===(_h=null===(_g=null===(_f=(yield axios.head(seed,{headers:headers,signal:signal})).request)||void 0===_f?void 0:_f.responseURL)||void 0===_g?void 0:_g.split("?url="))||void 0===_h?void 0:_h[1])||seed;streamLinks.push({server:"G-Drive",link:newLink,type:"mkv"})}}catch(err){}return streamLinks}catch(error){return[]}})}const getStream=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,signal:signal,providerContext:providerContext}){const{axios:axios,cheerio:cheerio,commonHeaders:headers}=providerContext;try{const data=(yield axios.get(link,{signal:signal})).data,$=cheerio.load(data),streams=[],promises=$(".button2,.button1,.button3,.button4,.button").toArray().map(element=>__awaiter(this,void 0,void 0,function*(){const title=$(element).text();let link=$(element).attr("href");if(title.includes("GDFLIX")&&link){const gdLinks=yield gdflixExtractor(link,signal,axios,cheerio,headers);streams.push(...gdLinks)}const alreadyAdded=streams.find(s=>s.link===link);!title||!link||title.includes("Watch")||title.includes("Login")||title.includes("GoFile")||alreadyAdded||streams.push({server:title,link:link,type:"mkv"})}));return yield Promise.all(promises),streams}catch(err){return[]}})};exports.getStream=getStream;
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===r||__defProp(e,n,{get:()=>t[n],enumerable:!(o=__getOwnPropDesc(t,n))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,n)=>{var a=e=>{try{s(r.next(e))}catch(e){n(e)}},l=e=>{try{s(r.throw(e))}catch(e){n(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,l);s((r=r.apply(e,t)).next())}),stream_exports={};function gdflixExtractor(e,t,r,o,n){return __async(this,null,function*(){var a,l,s,i,d,c,p;try{const u=[],_=(yield r(`${e}`,{headers:n,signal:t})).data;let y=o.load(_);if(null==(a=y("body").attr("onload"))?void 0:a.includes("location.replace")){const e=null==(i=null==(s=null==(l=y("body").attr("onload"))?void 0:l.split("location.replace('"))?void 0:s[1].split("'"))?void 0:i[0];if(e){const a=yield r.get(e,{headers:n,signal:t});y=o.load(a.data)}}try{const t=e.split("/").slice(0,3).join("/"),a=y(".btn-secondary").attr("href")||"";if(a.includes("indexbot")){const e=yield r.get(a,{headers:n}),t=e.data.match(/formData\.append\('token', '([a-f0-9]+)'\)/)[1],o=new FormData;o.append("token",t);const l=e.data.match(/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/)[1],s=a.split("/download")[0],i=yield fetch(s+"/download?id="+l,{method:"POST",body:o,headers:{Referer:a,Cookie:"PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308"}}),d=yield i.json();u.push({server:"ResumeBot",link:d.url,type:"mkv"})}else{const e=t+a,l=(yield r.get(e,{headers:n})).data,s=o.load(l)(".btn-success").attr("href");s&&u.push({server:"ResumeCloud",link:s,type:"mkv"})}}catch(e){}try{const e=y(".btn-danger").attr("href")||"";if(e.includes("?url=")){const t=e.split("=")[1],r=new FormData;r.append("keys",t);const o=e.split("/").slice(0,3).join("/")+"/api",n=yield fetch(o,{method:"POST",body:r,headers:{"x-token":o}}),a=yield n.json();if(!1===a.error){const e=a.url;u.push({server:"Gdrive-Instant",link:e,type:"mkv"})}}else{const o=(null==(p=null==(c=null==(d=(yield r.head(e,{headers:n,signal:t})).request)?void 0:d.responseURL)?void 0:c.split("?url="))?void 0:p[1])||e;u.push({server:"G-Drive",link:o,type:"mkv"})}}catch(e){}return u}catch(e){return[]}})}__export(stream_exports,{getStream:()=>getStream}),__name(gdflixExtractor,"gdflixExtractor");var getStream=__name(function(e){return __async(this,arguments,function*({link:e,signal:t,providerContext:r}){const{axios:o,cheerio:n,commonHeaders:a}=r;try{const r=(yield o.get(e,{signal:t})).data,l=n.load(r),s=[],i=l(".button2,.button1,.button3,.button4,.button").toArray().map(e=>__async(null,null,function*(){const r=l(e).text();let i=l(e).attr("href");if(r.includes("GDFLIX")&&i){const e=yield gdflixExtractor(i,t,o,n,a);s.push(...e)}const d=s.find(e=>e.link===i);!r||!i||r.includes("Watch")||r.includes("Login")||r.includes("GoFile")||d||s.push({server:r,link:i,type:"mkv"})}));return yield Promise.all(i),s}catch(e){return[]}})},"getStream");exports.getStream=getStream;