mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
Add new providers for kmMovies, movies4u,katmoviefix, and zeefliz
Co-authored-by: DHR-Store <boss@dhrgroup.ai>
This commit is contained in:
1
dist/katMovieFix/catalog.js
vendored
Normal file
1
dist/katMovieFix/catalog.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.catalog=void 0,exports.catalog=[{title:"Netflix",filter:"/category/netflix/"},{title:"Anime",filter:"/category/anime/"}];
|
||||||
1
dist/katMovieFix/episodes.js
vendored
Normal file
1
dist/katMovieFix/episodes.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};function getEpisodeLinks(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){try{const res=yield providerContext.axios.get(url),$=providerContext.cheerio.load(res.data||""),episodes=[];return $("a").each((i,el)=>{var _a;const $el=$(el),href=($el.attr("href")||"").trim(),text=$el.text().trim();if(href&&(text.includes("Episode")||/E\d+/i.test(text)||href.includes("vcloud.lol"))){let epNum=(null===(_a=text.match(/E\d+/i))||void 0===_a?void 0:_a[0])||text;/^\d+$/.test(epNum)&&(epNum=`Episode ${epNum}`),episodes.push({title:epNum,link:href})}}),episodes}catch(err){return[]}})}function getEpisodes(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){return yield getEpisodeLinks({url:url,providerContext:providerContext})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodeLinks=getEpisodeLinks,exports.getEpisodes=getEpisodes;
|
||||||
1
dist/katMovieFix/meta.js
vendored
Normal file
1
dist/katMovieFix/meta.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scrapeEpisodePage=exports.getMeta=void 0;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"},getMeta=function({link:link,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext;return axios.get(link,{headers:headers}).then(response=>{var _a;const $=cheerio.load(response.data),infoContainer=$(".entry-content,.post-inner"),title=$("h1.entry-title").text().trim()||$("h2.entry-title").text().trim()||"",imdbMatch=null===(_a=infoContainer.html())||void 0===_a?void 0:_a.match(/tt\d+/),imdbId=imdbMatch?imdbMatch[0]:"",synopsis=infoContainer.find("h3:contains('SYNOPSIS'), h3:contains('synopsis')").next("p").text().trim()||"";let image=infoContainer.find("img").first().attr("src")||"";image.startsWith("//")&&(image="https:"+image);const type=/Season \d+/i.test(infoContainer.text())?"series":"movie",linkList=[];return"series"===type?infoContainer.find("h2 a").each((_,el)=>{var _a;const el$=$(el),href=null===(_a=el$.attr("href"))||void 0===_a?void 0:_a.trim(),linkText=el$.text().trim();href&&linkText.includes("Single Episode")&&linkList.push({title:linkText,episodesLink:href,directLinks:[]})}):infoContainer.find("a[href]").each((_,aEl)=>{var _a;const el$=$(aEl),href=(null===(_a=el$.attr("href"))||void 0===_a?void 0:_a.trim())||"";if(!href)return;const btnText=el$.text().trim()||"Download";linkList.push({title:btnText,directLinks:[{title:btnText,link:href,type:"movie"}],episodesLink:""})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:linkList}}).catch(err=>({title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}))};exports.getMeta=getMeta;const scrapeEpisodePage=function({link:link,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext,result=[];return axios.get(link,{headers:headers}).then(response=>{const $=cheerio.load(response.data);return $(".entry-content,.post-inner").find("h3 a").each((_,el)=>{var _a;const el$=$(el),href=null===(_a=el$.attr("href"))||void 0===_a?void 0:_a.trim(),btnText=el$.text().trim()||"Download";href&&result.push({title:btnText,link:href,type:"series"})}),result}).catch(err=>result)};exports.scrapeEpisodePage=scrapeEpisodePage;
|
||||||
1
dist/katMovieFix/posts.js
vendored
Normal file
1
dist/katMovieFix/posts.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;const defaultHeaders={Referer:"https://www.google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language":"en-US,en;q=0.9",Pragma:"no-cache","Cache-Control":"no-cache"};function getPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:filter,page:page,query:"",signal:signal,providerContext:providerContext})})}function getSearchPosts(_a){return __awaiter(this,arguments,void 0,function*({searchQuery:searchQuery,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:"",page:page,query:searchQuery,signal:signal,providerContext:providerContext})})}function fetchPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,query:query,page:page=1,signal:signal,providerContext:providerContext}){try{const baseUrl=yield providerContext.getBaseUrl("katmoviefix");let url;url=query&&query.trim()?`${baseUrl}/?s=${encodeURIComponent(query)}${page>1?`&paged=${page}`:""}`:filter?filter.startsWith("/")?`${baseUrl}${filter.replace(/\/$/,"")}${page>1?`/page/${page}`:""}`:`${baseUrl}/${filter}${page>1?`/page/${page}`:""}`:`${baseUrl}${page>1?`/page/${page}`:""}`;const{axios:axios,cheerio:cheerio}=providerContext,res=yield axios.get(url,{headers:defaultHeaders,signal:signal}),$=cheerio.load(res.data||""),resolveUrl=href=>(null==href?void 0:href.startsWith("http"))?href:`${baseUrl}${href.startsWith("/")?"":"/"}${href}`,seen=new Set,catalog=[],POST_SELECTORS=[".pstr_box","article",".result-item",".post",".item",".thumbnail",".latest-movies",".movie-item"].join(",");return $(POST_SELECTORS).each((_,el)=>{var _a;const card=$(el);let link=card.find("a[href]").first().attr("href")||"";if(!link)return;if(link=resolveUrl(link),seen.has(link))return;let title=card.find("h2").first().text().trim()||(null===(_a=card.find("a[title]").first().attr("title"))||void 0===_a?void 0:_a.trim())||card.text().trim();if(title=title.replace(/\[.*?\]/g,"").replace(/\(.+?\)/g,"").replace(/\s{2,}/g," ").trim(),!title)return;const img=card.find("img").first().attr("src")||card.find("img").first().attr("data-src")||card.find("img").first().attr("data-original")||"",image=img?resolveUrl(img):"";seen.add(link),catalog.push({title:title,link:link,image:image})}),catalog.slice(0,100)}catch(err){return[]}})}
|
||||||
1
dist/katMovieFix/stream.js
vendored
Normal file
1
dist/katMovieFix/stream.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"};function getStream(_a){return __awaiter(this,arguments,void 0,function*({link:link,type:type,signal:signal,providerContext:providerContext}){const{axios:axios,cheerio:cheerio,extractors:extractors}=providerContext,{hubcloudExtracter:hubcloudExtracter}=extractors;try{const streamLinks=[],response=yield axios.get(link,{headers:headers}),$=cheerio.load(response.data);$("a[href*='pixeldrain.dev/api/file/']").each((_,el)=>{var _a;const href=null===(_a=$(el).attr("href"))||void 0===_a?void 0:_a.trim();href&&streamLinks.push({server:"pixeldrain",link:href,type:"mp4"})});const hubcloudStreams=yield hubcloudExtracter(link,signal);return streamLinks.push(...hubcloudStreams),streamLinks}catch(error){return[]}})}
|
||||||
1
dist/kmMovies/catalog.js
vendored
Normal file
1
dist/kmMovies/catalog.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.catalog=void 0,exports.catalog=[{title:"Latest",filter:""},{title:"Bollywood",filter:"category/movies/"},{title:"Dual",filter:"category/dual-audio/"}];
|
||||||
1
dist/kmMovies/episodes.js
vendored
Normal file
1
dist/kmMovies/episodes.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};function getEpisodeLinks(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){try{const res=yield providerContext.axios.get(url),$=providerContext.cheerio.load(res.data||""),episodes=[];return $("h4.fittexted_for_content_h4").each((_,h4El)=>{const epTitle=$(h4El).text().trim();epTitle&&$(h4El).nextUntil("h4, hr").find("a[href]").each((_,linkEl)=>{let href=($(linkEl).attr("href")||"").trim();if(!href)return;href.startsWith("http")||(href=new URL(href,url).href);const btnText=$(linkEl).text().trim()||"Watch Episode",lowerHref=href.toLowerCase();(lowerHref.includes("skydro")||lowerHref.includes("flexplayer.buzz"))&&episodes.push({title:`${epTitle} - ${btnText}`,link:href})})}),episodes.sort((a,b)=>{var _a,_b;return parseInt((null===(_a=a.title.match(/\d+/))||void 0===_a?void 0:_a[0])||"0")-parseInt((null===(_b=b.title.match(/\d+/))||void 0===_b?void 0:_b[0])||"0")}),episodes}catch(err){return[]}})}function getEpisodes(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){return yield getEpisodeLinks({url:url,providerContext:providerContext})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodeLinks=getEpisodeLinks,exports.getEpisodes=getEpisodes;
|
||||||
1
dist/kmMovies/meta.js
vendored
Normal file
1
dist/kmMovies/meta.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const kmmHeaders={Referer:"https://google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"},getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b,_c;try{const{axios:axios,cheerio:cheerio}=providerContext;if(!link.startsWith("http")){link=`${yield providerContext.getBaseUrl("kmmovies")}${link.startsWith("/")?"":"/"}${link}`}const res=yield axios.get(link,{headers:kmmHeaders}),$=cheerio.load(res.data),title=$("h1, h2, .animated-text").first().text().trim()||(null===(_b=$("meta[property='og:title']").attr("content"))||void 0===_b?void 0:_b.trim())||$("title").text().trim()||"Unknown";let image=$("div.wp-slider-container img").first().attr("src")||$("meta[property='og:image']").attr("content")||$("meta[name='twitter:image']").attr("content")||"";image&&image.startsWith("http")||(image=new URL(image||"/placeholder.png",link).href);let synopsis="";$("p").each((_,el)=>{const text=$(el).text().trim();if(text&&text.length>40&&!text.toLowerCase().includes("download")&&!text.toLowerCase().includes("quality"))return synopsis=text,!1}),synopsis||(synopsis=$("meta[property='og:description']").attr("content")||$("meta[name='description']").attr("content")||"");const tags=[];res.data.toLowerCase().includes("action")&&tags.push("Action"),res.data.toLowerCase().includes("drama")&&tags.push("Drama"),res.data.toLowerCase().includes("romance")&&tags.push("Romance"),res.data.toLowerCase().includes("thriller")&&tags.push("Thriller");const cast=[];$("p").each((_,el)=>{const text=$(el).text().trim();/starring|cast/i.test(text)&&text.split(",").forEach(name=>cast.push(name.trim()))});let rating=(null===(_c=$("p").text().match(/IMDb Rating[:\s]*([0-9.]+)/i))||void 0===_c?void 0:_c[1])||"";rating&&!rating.includes("/")&&(rating+="/10");const imdbLink=$("p a[href*='imdb.com']").attr("href")||"",imdbId=imdbLink&&imdbLink.includes("/tt")?"tt"+imdbLink.split("/tt")[1].split("/")[0]:"",linkList=[],isSeries=$(".download-options-grid").length>0;return isSeries?$(".download-card").each((_,card)=>{const card$=$(card),quality=card$.find(".download-quality-text").text().trim(),size=card$.find(".download-size-info").text().trim()||"",href=card$.find("a.tabs-download-button").attr("href")||"";if(href){const titleText=`Download ${quality} ${size}`.trim();linkList.push({title:titleText,episodesLink:href,quality:quality||"AUTO",directLinks:[{link:href,title:titleText,type:"series"}]})}}):$("a.modern-download-button").each((_,a)=>{const quality=$(a).closest(".modern-option-card").find(".modern-badge").text().trim()||"AUTO",href=$(a).attr("href")||"",titleText=`Download ${quality}`;href&&linkList.push({title:titleText,episodesLink:href,quality:quality,directLinks:[{link:href,title:titleText,type:"movie"}]})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:isSeries?"series":"movie",tags:tags,cast:cast,rating:rating,linkList:linkList}}catch(err){return{title:"",synopsis:"",image:"https://via.placeholder.com/300x450",imdbId:"",type:"movie",tags:[],cast:[],rating:"",linkList:[]}}})};exports.getMeta=getMeta;
|
||||||
1
dist/kmMovies/posts.js
vendored
Normal file
1
dist/kmMovies/posts.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;const defaultHeaders={Referer:"https://www.google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language":"en-US,en;q=0.9",Pragma:"no-cache","Cache-Control":"no-cache"};function getPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:filter,page:page,query:"",signal:signal,providerContext:providerContext})})}function getSearchPosts(_a){return __awaiter(this,arguments,void 0,function*({searchQuery:searchQuery,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:"",page:page,query:searchQuery,signal:signal,providerContext:providerContext})})}function fetchPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,query:query,page:page=1,signal:signal,providerContext:providerContext}){try{const baseUrl=providerContext.getBaseUrl("kmmovies");let url;url=query&&query.trim()?`${baseUrl}/?s=${encodeURIComponent(query)}${page>1?`&paged=${page}`:""}`:filter?filter.startsWith("/")?`${baseUrl}${filter.replace(/\/$/,"")}${page>1?`/page/${page}`:""}`:`${baseUrl}/${filter}${page>1?`/page/${page}`:""}`:`${baseUrl}${page>1?`/page/${page}`:""}`;const{axios:axios,cheerio:cheerio}=providerContext,res=yield axios.get(url,{headers:defaultHeaders,signal:signal}),$=cheerio.load(res.data||""),resolveUrl=href=>(null==href?void 0:href.startsWith("http"))?href:`${baseUrl}${href.startsWith("/")?"":"/"}${href}`,seen=new Set,catalog=[],POST_SELECTORS=[".pstr_box","article",".result-item",".post",".item",".thumbnail",".latest-movies",".movie-item"].join(",");return $(POST_SELECTORS).each((_,el)=>{var _a;const card=$(el);let link=card.find("a[href]").first().attr("href")||"";if(!link)return;if(link=resolveUrl(link),seen.has(link))return;let title=card.find("h2").first().text().trim()||(null===(_a=card.find("a[title]").first().attr("title"))||void 0===_a?void 0:_a.trim())||card.text().trim();if(title=title.replace(/\[.*?\]/g,"").replace(/\(.+?\)/g,"").replace(/\s{2,}/g," ").trim(),!title)return;const img=card.find("img").first().attr("src")||card.find("img").first().attr("data-src")||card.find("img").first().attr("data-original")||"",image=img?resolveUrl(img):"";seen.add(link),catalog.push({title:title,link:link,image:image})}),catalog.slice(0,100)}catch(err){return[]}})}
|
||||||
1
dist/kmMovies/stream.js
vendored
Normal file
1
dist/kmMovies/stream.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"};function getStream(_a){return __awaiter(this,arguments,void 0,function*({link:link,type:type,signal:signal,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext;try{const streamLinks=[],res=yield axios.get(link,{headers:headers,signal:signal}),$=cheerio.load(res.data),ALLOWED_SERVERS=["ONE CLICK","ZIP-ZAP","ULTRA FAST","SKYDROP"];return $("a.download-button").each((_,el)=>{var _a;const btn=$(el),href=null===(_a=btn.attr("href"))||void 0===_a?void 0:_a.trim(),serverName=btn.text().trim()||"Unknown Server",isAllowed=ALLOWED_SERVERS.some(allowed=>serverName.toUpperCase().includes(allowed)||allowed.includes(serverName.toUpperCase()));href&&isAllowed&&streamLinks.push({server:serverName,link:href,type:"mkv"})}),streamLinks}catch(error){return[]}})}
|
||||||
1
dist/movies4u/catalog.js
vendored
Normal file
1
dist/movies4u/catalog.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.catalog=void 0,exports.catalog=[{title:"Trending",filter:""},{title:"Anime",filter:"/category/anime/"}];
|
||||||
1
dist/movies4u/episodes.js
vendored
Normal file
1
dist/movies4u/episodes.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){const{axios:axios,cheerio:cheerio,commonHeaders:headers}=providerContext;try{const res=yield axios.get(url,{headers:Object.assign(Object.assign({},headers),{cookie:"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=Zl2yiOCN3pzGUd0Bgs.VyBXniJooDbG2Tk1g7DEoRnw-1756381111-1.2.1.1-RVPZoWGCAygGNAHavrVR0YaqASWZlJyYff8A.oQfPB5qbcPrAVud42BzsSwcDgiKAP0gw5D92V3o8XWwLwDRNhyg3DuL1P8wh2K4BCVKxWvcy.iCCxczKtJ8QSUAsAQqsIzRWXk29N6X.kjxuOTYlfB2jrlq12TRDld_zTbsskNcTxaA.XQekUcpGLseYqELuvlNOQU568NZD6LiLn3ICyFThMFAx6mIcgXkxVAvnxU; xla=s4t"})}),$=cheerio.load(res.data),container=$(".entry-content,.entry-inner, .download-links-div");$(".unili-content,.code-block-1").remove();const episodes=[];return container.find("h5").each((index,element)=>{const el=$(element),title=el.text().trim(),hubCloudLink=el.next(".downloads-btns-div").find('a[style*="background: linear-gradient(135deg,#e629d0,#007bff);"]').attr("href");if(title&&hubCloudLink){const cleanedTitle=title.replace(/[-:]/g,"").trim();episodes.push({title:cleanedTitle,link:hubCloudLink})}}),episodes}catch(err){return[]}})};exports.getEpisodes=getEpisodes;
|
||||||
1
dist/movies4u/meta.js
vendored
Normal file
1
dist/movies4u/meta.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Cookie:"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b,_c;const{axios:axios,cheerio:cheerio}=providerContext,url=link,baseUrl=url.split("/").slice(0,3).join("/"),emptyResult={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const response=yield axios.get(url,{headers:Object.assign(Object.assign({},headers),{Referer:baseUrl})}),$=cheerio.load(response.data),infoContainer=$(".entry-content, .post-inner").length?$(".entry-content, .post-inner"):$("body"),result={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]},infoParagraph=$("h2.movie-title").next("p").text();infoParagraph.includes("Season:")||infoParagraph.includes("Episode:")||infoParagraph.includes("SHOW Name:")?result.type="series":result.type="movie";const rawTitle=$("h1").text().trim()||$("h2").text().trim();result.title=rawTitle.split(/\[| \d+p| x\d+/)[0].trim();const showNameMatch=infoParagraph.match(/SHOW Name: (.+)/)||infoParagraph.match(/Name: (.+)/);showNameMatch&&showNameMatch[1]&&(result.title=result.title||showNameMatch[1].trim());const imdbMatch=(null===(_b=infoContainer.html())||void 0===_b?void 0:_b.match(/tt\d+/))||(null===(_c=$("a[href*='imdb.com/title/']").attr("href"))||void 0===_c?void 0:_c.match(/tt\d+/));result.imdbId=imdbMatch?imdbMatch[0]:"";let image=infoContainer.find(".post-thumbnail img").attr("src")||infoContainer.find("img[src]").first().attr("src")||"";image.startsWith("//")?image="https:"+image:image.startsWith("/")&&(image=baseUrl+image),(image.includes("no-thumbnail")||image.includes("placeholder"))&&(image=""),result.image=image,result.synopsis=$("h3.movie-title").filter((i,el)=>$(el).text().includes("Storyline")).next("p").text().trim()||infoContainer.find("p").first().text().trim()||"";const links=[];return $(".download-links-div").find("> h4").each((index,element)=>{var _a;const el=$(element),titleText=el.text().trim(),qualityMatch=null===(_a=titleText.match(/\d+p\b/))||void 0===_a?void 0:_a[0],fullTitle=titleText,downloadButtons=el.next(".downloads-btns-div").find("a");if(downloadButtons.length&&qualityMatch)if("series"===result.type)links.push({title:fullTitle,quality:qualityMatch,episodesLink:downloadButtons.attr("href")||"",directLinks:[]});else{const directLinks=[];downloadButtons.each((i,btn)=>{const btnEl=$(btn),link=btnEl.attr("href");link&&directLinks.push({title:btnEl.text().trim()||"Download",link:link,type:"movie"})}),directLinks.length&&links.push({title:fullTitle,quality:qualityMatch,episodesLink:"",directLinks:directLinks})}}),result.linkList=links,result}catch(err){return emptyResult}})};exports.getMeta=getMeta;
|
||||||
1
dist/movies4u/posts.js
vendored
Normal file
1
dist/movies4u/posts.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;const defaultHeaders={Referer:"https://www.google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language":"en-US,en;q=0.9",Pragma:"no-cache","Cache-Control":"no-cache"};function getPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:filter,page:page,query:"",signal:signal,providerContext:providerContext})})}function getSearchPosts(_a){return __awaiter(this,arguments,void 0,function*({searchQuery:searchQuery,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:"",page:page,query:searchQuery,signal:signal,providerContext:providerContext})})}function fetchPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,query:query,page:page=1,signal:signal,providerContext:providerContext}){try{const baseUrl=yield providerContext.getBaseUrl("movies4u");let url;url=query&&query.trim()?`${baseUrl}/?s=${encodeURIComponent(query)}${page>1?`&paged=${page}`:""}`:filter?filter.startsWith("/")?`${baseUrl}${filter.replace(/\/$/,"")}${page>1?`/page/${page}`:""}`:`${baseUrl}/${filter}${page>1?`/page/${page}`:""}`:`${baseUrl}${page>1?`/page/${page}`:""}`;const{axios:axios,cheerio:cheerio}=providerContext,res=yield axios.get(url,{headers:defaultHeaders,signal:signal}),$=cheerio.load(res.data||""),resolveUrl=href=>(null==href?void 0:href.startsWith("http"))?href:new URL(href,url).href,seen=new Set,catalog=[],POST_SELECTORS=[".pstr_box","article",".result-item",".post",".item",".thumbnail",".latest-movies",".movie-item"].join(",");return $(POST_SELECTORS).each((_,el)=>{var _a;const card=$(el);let link=card.find("a[href]").first().attr("href")||"";if(!link)return;if(link=resolveUrl(link),seen.has(link))return;let title=card.find("h2").first().text().trim()||(null===(_a=card.find("a[title]").first().attr("title"))||void 0===_a?void 0:_a.trim())||card.text().trim();if(title=title.replace(/\[.*?\]/g,"").replace(/\(.+?\)/g,"").replace(/\s{2,}/g," ").trim(),!title)return;const img=card.find("img").first().attr("src")||card.find("img").first().attr("data-src")||card.find("img").first().attr("data-original")||"",image=img?resolveUrl(img):"";seen.add(link),catalog.push({title:title,link:link,image:image})}),catalog.slice(0,100)}catch(err){return[]}})}
|
||||||
1
dist/movies4u/stream.js
vendored
Normal file
1
dist/movies4u/stream.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Cookie:"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"};function getStream(_a){return __awaiter(this,arguments,void 0,function*({link:link,type:type,signal:signal,providerContext:providerContext}){var _b,_c,_d,_e;const{axios:axios,cheerio:cheerio,extractors:extractors}=providerContext,{hubcloudExtracter:hubcloudExtracter}=extractors;try{const streamLinks=[];if("movie"===type){const dotlinkText=(yield axios(`${link}`,{headers:headers})).data;link=(dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i)||[])[1];try{const filepressLink=cheerio.load(dotlinkText)('.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]').parent().attr("href"),filepressID=null==filepressLink?void 0:filepressLink.split("/").pop(),filepressBaseUrl=null==filepressLink?void 0:filepressLink.split("/").slice(0,-2).join("/"),filepressTokenRes=yield axios.post(filepressBaseUrl+"/api/file/downlaod/",{id:filepressID,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:filepressBaseUrl}});if(null===(_b=filepressTokenRes.data)||void 0===_b?void 0:_b.status){const filepressToken=null===(_c=filepressTokenRes.data)||void 0===_c?void 0:_c.data,filepressStreamLink=yield axios.post(filepressBaseUrl+"/api/file/downlaod2/",{id:filepressToken,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:filepressBaseUrl}});streamLinks.push({server:"filepress",link:null===(_e=null===(_d=filepressStreamLink.data)||void 0===_d?void 0:_d.data)||void 0===_e?void 0:_e[0],type:"mkv"})}}catch(error){}}return yield hubcloudExtracter(link,signal)}catch(error){return error.message.includes("Aborted"),[]}})}
|
||||||
1
dist/zeefliz/catalog.js
vendored
Normal file
1
dist/zeefliz/catalog.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.catalog=void 0,exports.catalog=[{title:"Trending",filter:""},{title:"Shows",filter:"category/web-series/"}];
|
||||||
1
dist/zeefliz/episodes.js
vendored
Normal file
1
dist/zeefliz/episodes.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(_a){return __awaiter(this,arguments,void 0,function*({url:url,providerContext:providerContext}){const{axios:axios,cheerio:cheerio,commonHeaders:headers}=providerContext;try{const res=yield axios.get(url,{headers:Object.assign(Object.assign({},headers),{cookie:"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=Zl2yiOCN3pzGUd0Bgs.VyBXniJooDbG2Tk1g7DEoRnw-1756381111-1.2.1.1-RVPZoWGCAygGNAHavrVR0YaqASWZlJyYff8A.oQfPB5qbcPrAVud42BzsSwcDgiKAP0gw5D92V3o8XWwLwDRNhyg3DuL1P8wh2K4BCVKxWvcy.iCCxczKtJ8QSUAsAQqsIzRWXk29N6X.kjxuOTYlfB2jrlq12TRDld_zTbsskNcTxaA.XQekUcpGLseYqELuvlNOQU568NZD6LiLn3ICyFThMFAx6mIcgXkxVAvnxU; xla=s4t"})}),$=cheerio.load(res.data),container=$(".entry-content,.entry-inner");$(".unili-content,.code-block-1").remove();const episodes=[];return container.find("h4").each((index,element)=>{const el=$(element),title=el.text().replace(/-/g,"").replace(/:/g,""),link=el.next("p").find('.btn-outline[style="background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;"]').parent().attr("href");title&&link&&episodes.push({title:title,link:link})}),episodes}catch(err){return[]}})};exports.getEpisodes=getEpisodes;
|
||||||
1
dist/zeefliz/meta.js
vendored
Normal file
1
dist/zeefliz/meta.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext,url=link,baseUrl=url.split("/").slice(0,3).join("/"),emptyResult={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const response=yield axios.get(url,{headers:Object.assign(Object.assign({},headers),{Referer:baseUrl})}),$=cheerio.load(response.data),content=$(".entry-content, .post-inner").length?$(".entry-content, .post-inner"):$("body"),result={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};let rawTitle=content.find("h1, h2").first().text().trim();rawTitle=rawTitle.replace(/^Download\s*/i,""),result.title=rawTitle;const pageText=content.text();/Season\s*\d+/i.test(pageText)||/Episode\s*\d+/i.test(pageText)?result.type="series":result.type="movie";const imdbHref=content.find("a[href*='imdb.com/title/']").attr("href"),imdbMatch=null==imdbHref?void 0:imdbHref.match(/tt\d+/);result.imdbId=imdbMatch?imdbMatch[0]:"";let image=content.find("img").first().attr("data-src")||content.find("img").first().attr("src")||"";image.startsWith("//")?image="https:"+image:image.startsWith("/")&&(image=baseUrl+image),(image.includes("no-thumbnail")||image.includes("placeholder"))&&(image=""),result.image=image,result.synopsis=content.find("p").first().text().trim()||"";const links=[];return"series"===result.type?content.find("h3").each((_,h3)=>{var _a;const h3Text=$(h3).text().trim(),qualityMatch=(null===(_a=h3Text.match(/\d+p/))||void 0===_a?void 0:_a[0])||"",href=$(h3).next("p").find("a").filter((_,a)=>/v-cloud/i.test($(a).text())).first().attr("href");href&&links.push({title:h3Text,quality:qualityMatch,episodesLink:href,directLinks:[]})}):content.find("h5").each((_,h5)=>{var _a;const h5Text=$(h5).text().trim(),qualityMatch=(null===(_a=h5Text.match(/\d+p/))||void 0===_a?void 0:_a[0])||"",href=$(h5).next("p").find("a").attr("href");href&&links.push({title:h5Text,quality:qualityMatch,episodesLink:"",directLinks:[{title:"Movie",link:href,type:"movie"}]})}),result.linkList=links,result}catch(err){return emptyResult}})};exports.getMeta=getMeta;
|
||||||
1
dist/zeefliz/posts.js
vendored
Normal file
1
dist/zeefliz/posts.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;const defaultHeaders={Referer:"https://www.google.com","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language":"en-US,en;q=0.9",Pragma:"no-cache","Cache-Control":"no-cache"};function getPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:filter,page:page,query:"",signal:signal,providerContext:providerContext})})}function getSearchPosts(_a){return __awaiter(this,arguments,void 0,function*({searchQuery:searchQuery,page:page=1,signal:signal,providerContext:providerContext}){return fetchPosts({filter:"",page:page,query:searchQuery,signal:signal,providerContext:providerContext})})}function fetchPosts(_a){return __awaiter(this,arguments,void 0,function*({filter:filter,query:query,page:page=1,signal:signal,providerContext:providerContext}){try{const baseUrl=yield providerContext.getBaseUrl("zeefliz");let url;if(query&&query.trim()){const params=new URLSearchParams;params.append("s",query.trim()),page>1&¶ms.append("paged",page.toString()),url=`${baseUrl}/?${params.toString()}`}else url=filter?filter.startsWith("/")?`${baseUrl}${filter.replace(/\/$/,"")}${page>1?`/page/${page}`:""}`:`${baseUrl}/${filter}${page>1?`/page/${page}`:""}`:`${baseUrl}${page>1?`/page/${page}`:""}`;const{axios:axios,cheerio:cheerio}=providerContext,res=yield axios.get(url,{headers:defaultHeaders,signal:signal}),$=cheerio.load(res.data||""),resolveUrl=href=>(null==href?void 0:href.startsWith("http"))?href:new URL(href,baseUrl).href,seen=new Set,catalog=[];return $("section.site-main article.post").each((_,el)=>{var _a;const card=$(el);let link=card.find("a[href]").first().attr("href")||"";if(!link)return;if(link=resolveUrl(link),seen.has(link))return;let title=card.find("h3.entry-title a").text().trim()||card.find("a[rel='bookmark']").text().trim()||(null===(_a=card.find("a[title]").attr("title"))||void 0===_a?void 0:_a.trim())||"";if(title=title.replace(/^Download\s*/i,"").trim(),!title)return;let img=card.find("img").attr("bv-data-src")||card.find("img").attr("src")||card.find("img").attr("data-src")||card.find("img").attr("data-original")||"";const image=img?resolveUrl(img):"";seen.add(link),catalog.push({title:title,link:link,image:image})}),catalog.slice(0,100)}catch(err){return[]}})}
|
||||||
1
dist/zeefliz/stream.js
vendored
Normal file
1
dist/zeefliz/stream.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";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())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Cookie:"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=nJQQ9ncb6m2Nc7HoxzuphPhnQgLzI6nBmzl2D.9oY4E-1759137994-1.2.1.1-pe7DiQHVsfZjnbHWTnaNbMiTYEuk.VvpPGaMeTtHOh7p9TKG5auBIDGDDW93devKuNcOlkhe6mk4v5OcsM0H_q3Te02eCPoTNgZsW8terjwvnQUebbbe8QKjMaVsVKgnbiAxS2ESM9aB3fbiQ9diuNT6ziY.2U4mPaJ0Y4vCu3404o5qBEw5c2psIuabKUTZviA2NJvN.lx5jAFQnB.HXeXJnUuCcbQac7G1BYBfdso","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"};function getStream(_a){return __awaiter(this,arguments,void 0,function*({link:link,type:type,signal:signal,providerContext:providerContext}){var _b,_c,_d,_e;const{axios:axios,cheerio:cheerio,extractors:extractors}=providerContext,{hubcloudExtracter:hubcloudExtracter}=extractors;try{const streamLinks=[];if("movie"===type){const dotlinkText=(yield axios(`${link}`,{headers:headers})).data;link=(dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i)||[])[1];try{const filepressLink=cheerio.load(dotlinkText)('.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]').parent().attr("href"),filepressID=null==filepressLink?void 0:filepressLink.split("/").pop(),filepressBaseUrl=null==filepressLink?void 0:filepressLink.split("/").slice(0,-2).join("/"),filepressTokenRes=yield axios.post(filepressBaseUrl+"/api/file/downlaod/",{id:filepressID,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:filepressBaseUrl}});if(null===(_b=filepressTokenRes.data)||void 0===_b?void 0:_b.status){const filepressToken=null===(_c=filepressTokenRes.data)||void 0===_c?void 0:_c.data,filepressStreamLink=yield axios.post(filepressBaseUrl+"/api/file/downlaod2/",{id:filepressToken,method:"indexDownlaod",captchaValue:null},{headers:{"Content-Type":"application/json",Referer:filepressBaseUrl}});streamLinks.push({server:"filepress",link:null===(_e=null===(_d=filepressStreamLink.data)||void 0===_d?void 0:_d.data)||void 0===_e?void 0:_e[0],type:"mkv"})}}catch(error){}}return yield hubcloudExtracter(link,signal)}catch(error){return error.message.includes("Aborted"),[]}})}
|
||||||
10
providers/katMovieFix/catalog.ts
Normal file
10
providers/katMovieFix/catalog.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const catalog = [
|
||||||
|
{
|
||||||
|
title: "Netflix",
|
||||||
|
filter: "/category/netflix/",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Anime",
|
||||||
|
filter: "/category/anime/",
|
||||||
|
},
|
||||||
|
];
|
||||||
47
providers/katMovieFix/episodes.ts
Normal file
47
providers/katMovieFix/episodes.ts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { EpisodeLink, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
export async function getEpisodeLinks({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
try {
|
||||||
|
const res = await providerContext.axios.get(url);
|
||||||
|
const $ = providerContext.cheerio.load(res.data || "");
|
||||||
|
const episodes: EpisodeLink[] = [];
|
||||||
|
|
||||||
|
// Agar anchor tag me episode links diye hain
|
||||||
|
$("a").each((i, el) => {
|
||||||
|
const $el = $(el);
|
||||||
|
const href = ($el.attr("href") || "").trim();
|
||||||
|
const text = $el.text().trim();
|
||||||
|
|
||||||
|
if (href && (text.includes("Episode") || /E\d+/i.test(text) || href.includes("vcloud.lol"))) {
|
||||||
|
let epNum = text.match(/E\d+/i)?.[0] || text;
|
||||||
|
if (/^\d+$/.test(epNum)) epNum = `Episode ${epNum}`;
|
||||||
|
episodes.push({
|
||||||
|
title: epNum,
|
||||||
|
link: href,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return episodes;
|
||||||
|
} catch (err) {
|
||||||
|
console.error("getEpisodeLinks error:", err);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ✅ Ye wrapper export karna zaroori hai
|
||||||
|
export async function getEpisodes({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
return await getEpisodeLinks({ url, providerContext });
|
||||||
|
}
|
||||||
113
providers/katMovieFix/meta.ts
Normal file
113
providers/katMovieFix/meta.ts
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
import { Info, Link, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- getMeta using Promise ---
|
||||||
|
export const getMeta = function ({
|
||||||
|
link,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Info> {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
|
||||||
|
return axios
|
||||||
|
.get(link, { headers })
|
||||||
|
.then((response) => {
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const infoContainer = $(".entry-content,.post-inner");
|
||||||
|
|
||||||
|
const title =
|
||||||
|
$("h1.entry-title").text().trim() ||
|
||||||
|
$("h2.entry-title").text().trim() ||
|
||||||
|
"";
|
||||||
|
|
||||||
|
const imdbMatch = infoContainer.html()?.match(/tt\d+/);
|
||||||
|
const imdbId = imdbMatch ? imdbMatch[0] : "";
|
||||||
|
|
||||||
|
const synopsis =
|
||||||
|
infoContainer
|
||||||
|
.find("h3:contains('SYNOPSIS'), h3:contains('synopsis')")
|
||||||
|
.next("p")
|
||||||
|
.text()
|
||||||
|
.trim() || "";
|
||||||
|
|
||||||
|
let image = infoContainer.find("img").first().attr("src") || "";
|
||||||
|
if (image.startsWith("//")) image = "https:" + image;
|
||||||
|
|
||||||
|
const type = /Season \d+/i.test(infoContainer.text()) ? "series" : "movie";
|
||||||
|
const linkList: Link[] = [];
|
||||||
|
|
||||||
|
if (type === "series") {
|
||||||
|
// Single Episode Links
|
||||||
|
infoContainer.find("h2 a").each((_, el) => {
|
||||||
|
const el$ = $(el);
|
||||||
|
const href = el$.attr("href")?.trim();
|
||||||
|
const linkText = el$.text().trim();
|
||||||
|
if (href && linkText.includes("Single Episode")) {
|
||||||
|
linkList.push({ title: linkText, episodesLink: href, directLinks: [] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Movies
|
||||||
|
infoContainer.find("a[href]").each((_, aEl) => {
|
||||||
|
const el$ = $(aEl);
|
||||||
|
const href = el$.attr("href")?.trim() || "";
|
||||||
|
if (!href) return;
|
||||||
|
const btnText = el$.text().trim() || "Download";
|
||||||
|
linkList.push({
|
||||||
|
title: btnText,
|
||||||
|
directLinks: [{ title: btnText, link: href, type: "movie" }],
|
||||||
|
episodesLink: "",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return { title, synopsis, image, imdbId, type, linkList };
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error("getMeta error:", err);
|
||||||
|
return { title: "", synopsis: "", image: "", imdbId: "", type: "movie", linkList: [] };
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- scrapeEpisodePage using Promise ---
|
||||||
|
export const scrapeEpisodePage = function ({
|
||||||
|
link,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<{ title: string; link: string; type: "series" }[]> {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const result: { title: string; link: string; type: "series" }[] = [];
|
||||||
|
|
||||||
|
return axios
|
||||||
|
.get(link, { headers })
|
||||||
|
.then((response) => {
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
$(".entry-content,.post-inner")
|
||||||
|
.find("h3 a")
|
||||||
|
.each((_, el) => {
|
||||||
|
const el$ = $(el);
|
||||||
|
const href = el$.attr("href")?.trim();
|
||||||
|
const btnText = el$.text().trim() || "Download";
|
||||||
|
if (href) result.push({ title: btnText, link: href, type: "series" });
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error("scrapeEpisodePage error:", err);
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
};
|
||||||
145
providers/katMovieFix/posts.ts
Normal file
145
providers/katMovieFix/posts.ts
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
import { Post, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const defaultHeaders = {
|
||||||
|
Referer: "https://www.google.com",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
|
||||||
|
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
Pragma: "no-cache",
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Normal catalog posts ---
|
||||||
|
export async function getPosts({
|
||||||
|
filter,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({ filter, page, query: "", signal, providerContext });
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Search posts ---
|
||||||
|
export async function getSearchPosts({
|
||||||
|
searchQuery,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
searchQuery: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({
|
||||||
|
filter: "",
|
||||||
|
page,
|
||||||
|
query: searchQuery,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Core function ---
|
||||||
|
async function fetchPosts({
|
||||||
|
filter,
|
||||||
|
query,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
query?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
try {
|
||||||
|
const baseUrl = await providerContext.getBaseUrl("katmoviefix");
|
||||||
|
console.log("Base URL:", baseUrl);
|
||||||
|
let url: string;
|
||||||
|
|
||||||
|
// --- Build URL for category filter or search query
|
||||||
|
if (query && query.trim()) {
|
||||||
|
url = `${baseUrl}/?s=${encodeURIComponent(query)}${
|
||||||
|
page > 1 ? `&paged=${page}` : ""
|
||||||
|
}`;
|
||||||
|
} else if (filter) {
|
||||||
|
url = filter.startsWith("/")
|
||||||
|
? `${baseUrl}${filter.replace(/\/$/, "")}${
|
||||||
|
page > 1 ? `/page/${page}` : ""
|
||||||
|
}`
|
||||||
|
: `${baseUrl}/${filter}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
} else {
|
||||||
|
url = `${baseUrl}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const res = await axios.get(url, { headers: defaultHeaders, signal });
|
||||||
|
const $ = cheerio.load(res.data || "");
|
||||||
|
|
||||||
|
const resolveUrl = (href: string) =>
|
||||||
|
href?.startsWith("http")
|
||||||
|
? href
|
||||||
|
: `${baseUrl}${href.startsWith("/") ? "" : "/"}${href}`;
|
||||||
|
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const catalog: Post[] = [];
|
||||||
|
|
||||||
|
// --- HDMovie2 selectors
|
||||||
|
const POST_SELECTORS = [
|
||||||
|
".pstr_box",
|
||||||
|
"article",
|
||||||
|
".result-item",
|
||||||
|
".post",
|
||||||
|
".item",
|
||||||
|
".thumbnail",
|
||||||
|
".latest-movies",
|
||||||
|
".movie-item",
|
||||||
|
].join(",");
|
||||||
|
|
||||||
|
$(POST_SELECTORS).each((_, el) => {
|
||||||
|
const card = $(el);
|
||||||
|
let link = card.find("a[href]").first().attr("href") || "";
|
||||||
|
if (!link) return;
|
||||||
|
link = resolveUrl(link);
|
||||||
|
if (seen.has(link)) return;
|
||||||
|
|
||||||
|
let title =
|
||||||
|
card.find("h2").first().text().trim() ||
|
||||||
|
card.find("a[title]").first().attr("title")?.trim() ||
|
||||||
|
card.text().trim();
|
||||||
|
title = title
|
||||||
|
.replace(/\[.*?\]/g, "")
|
||||||
|
.replace(/\(.+?\)/g, "")
|
||||||
|
.replace(/\s{2,}/g, " ")
|
||||||
|
.trim();
|
||||||
|
if (!title) return;
|
||||||
|
|
||||||
|
const img =
|
||||||
|
card.find("img").first().attr("src") ||
|
||||||
|
card.find("img").first().attr("data-src") ||
|
||||||
|
card.find("img").first().attr("data-original") ||
|
||||||
|
"";
|
||||||
|
const image = img ? resolveUrl(img) : "";
|
||||||
|
|
||||||
|
seen.add(link);
|
||||||
|
catalog.push({ title, link, image });
|
||||||
|
});
|
||||||
|
|
||||||
|
return catalog.slice(0, 100);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(
|
||||||
|
"HDMovie2 fetchPosts error:",
|
||||||
|
err instanceof Error ? err.message : String(err)
|
||||||
|
);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
54
providers/katMovieFix/stream.ts
Normal file
54
providers/katMovieFix/stream.ts
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { ProviderContext, Stream } from "../types";
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getStream({
|
||||||
|
link,
|
||||||
|
type,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
type: string;
|
||||||
|
signal: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}) {
|
||||||
|
const { axios, cheerio, extractors } = providerContext;
|
||||||
|
const { hubcloudExtracter } = extractors;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const streamLinks: Stream[] = [];
|
||||||
|
const response = await axios.get(link, { headers });
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
|
||||||
|
// --- PixelDrain link scrape ---
|
||||||
|
$("a[href*='pixeldrain.dev/api/file/']").each((_, el) => {
|
||||||
|
const href = $(el).attr("href")?.trim();
|
||||||
|
if (href) {
|
||||||
|
streamLinks.push({
|
||||||
|
server: "pixeldrain",
|
||||||
|
link: href,
|
||||||
|
type: "mp4",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- hubcloud extraction ---
|
||||||
|
const hubcloudStreams = await hubcloudExtracter(link, signal);
|
||||||
|
streamLinks.push(...hubcloudStreams);
|
||||||
|
|
||||||
|
return streamLinks;
|
||||||
|
} catch (error: any) {
|
||||||
|
console.log("getStream error: ", error);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
5
providers/kmMovies/catalog.ts
Normal file
5
providers/kmMovies/catalog.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export const catalog = [
|
||||||
|
{ title: "Latest", filter: "" },
|
||||||
|
{ title: "Bollywood", filter: "category/movies/" },
|
||||||
|
{ title: "Dual", filter: "category/dual-audio/" },
|
||||||
|
];
|
||||||
64
providers/kmMovies/episodes.ts
Normal file
64
providers/kmMovies/episodes.ts
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
import { EpisodeLink, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
export async function getEpisodeLinks({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
try {
|
||||||
|
const res = await providerContext.axios.get(url);
|
||||||
|
const $ = providerContext.cheerio.load(res.data || "");
|
||||||
|
const episodes: EpisodeLink[] = [];
|
||||||
|
|
||||||
|
$("h4.fittexted_for_content_h4").each((_, h4El) => {
|
||||||
|
const epTitle = $(h4El).text().trim();
|
||||||
|
if (!epTitle) return;
|
||||||
|
|
||||||
|
// Next until next <h4> or <hr> ke andar saare <a> links
|
||||||
|
$(h4El)
|
||||||
|
.nextUntil("h4, hr")
|
||||||
|
.find("a[href]") // sirf <a> tags
|
||||||
|
.each((_, linkEl) => {
|
||||||
|
let href = ($(linkEl).attr("href") || "").trim();
|
||||||
|
if (!href) return;
|
||||||
|
if (!href.startsWith("http")) href = new URL(href, url).href;
|
||||||
|
|
||||||
|
const btnText = $(linkEl).text().trim() || "Watch Episode";
|
||||||
|
|
||||||
|
// --- Sirf SkyDrop links include karo
|
||||||
|
const lowerHref = href.toLowerCase();
|
||||||
|
if (lowerHref.includes("skydro") || lowerHref.includes("flexplayer.buzz")) {
|
||||||
|
episodes.push({
|
||||||
|
title: `${epTitle} - ${btnText}`,
|
||||||
|
link: href,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- Sort by episode number extracted from title
|
||||||
|
episodes.sort((a, b) => {
|
||||||
|
const numA = parseInt(a.title.match(/\d+/)?.[0] || "0");
|
||||||
|
const numB = parseInt(b.title.match(/\d+/)?.[0] || "0");
|
||||||
|
return numA - numB;
|
||||||
|
});
|
||||||
|
|
||||||
|
return episodes;
|
||||||
|
} catch (err) {
|
||||||
|
console.error("getEpisodeLinks error:", err);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- System wrapper
|
||||||
|
export async function getEpisodes({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
return await getEpisodeLinks({ url, providerContext });
|
||||||
|
}
|
||||||
171
providers/kmMovies/meta.ts
Normal file
171
providers/kmMovies/meta.ts
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
import { Info, Link, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const kmmHeaders = {
|
||||||
|
Referer: "https://google.com",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getMeta = async function ({
|
||||||
|
link,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Info> {
|
||||||
|
try {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
|
||||||
|
if (!link.startsWith("http")) {
|
||||||
|
const baseUrl = await providerContext.getBaseUrl("kmmovies");
|
||||||
|
link = `${baseUrl}${link.startsWith("/") ? "" : "/"}${link}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await axios.get(link, { headers: kmmHeaders });
|
||||||
|
const $ = cheerio.load(res.data);
|
||||||
|
|
||||||
|
// --- Title
|
||||||
|
const title =
|
||||||
|
$("h1, h2, .animated-text").first().text().trim() ||
|
||||||
|
$("meta[property='og:title']").attr("content")?.trim() ||
|
||||||
|
$("title").text().trim() ||
|
||||||
|
"Unknown";
|
||||||
|
|
||||||
|
// --- Poster Image
|
||||||
|
let image =
|
||||||
|
$("div.wp-slider-container img").first().attr("src") ||
|
||||||
|
$("meta[property='og:image']").attr("content") ||
|
||||||
|
$("meta[name='twitter:image']").attr("content") ||
|
||||||
|
"";
|
||||||
|
if (!image || !image.startsWith("http")) {
|
||||||
|
image = new URL(image || "/placeholder.png", link).href;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Synopsis
|
||||||
|
let synopsis = "";
|
||||||
|
$("p").each((_, el) => {
|
||||||
|
const text = $(el).text().trim();
|
||||||
|
if (
|
||||||
|
text &&
|
||||||
|
text.length > 40 &&
|
||||||
|
!text.toLowerCase().includes("download") &&
|
||||||
|
!text.toLowerCase().includes("quality")
|
||||||
|
) {
|
||||||
|
synopsis = text;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (!synopsis) {
|
||||||
|
synopsis =
|
||||||
|
$("meta[property='og:description']").attr("content") ||
|
||||||
|
$("meta[name='description']").attr("content") ||
|
||||||
|
"";
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Tags / Genre
|
||||||
|
const tags: string[] = [];
|
||||||
|
if (res.data.toLowerCase().includes("action")) tags.push("Action");
|
||||||
|
if (res.data.toLowerCase().includes("drama")) tags.push("Drama");
|
||||||
|
if (res.data.toLowerCase().includes("romance")) tags.push("Romance");
|
||||||
|
if (res.data.toLowerCase().includes("thriller")) tags.push("Thriller");
|
||||||
|
|
||||||
|
// --- Cast
|
||||||
|
const cast: string[] = [];
|
||||||
|
$("p").each((_, el) => {
|
||||||
|
const text = $(el).text().trim();
|
||||||
|
if (/starring|cast/i.test(text)) {
|
||||||
|
text.split(",").forEach((name) => cast.push(name.trim()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- Rating
|
||||||
|
let rating =
|
||||||
|
$("p")
|
||||||
|
.text()
|
||||||
|
.match(/IMDb Rating[:\s]*([0-9.]+)/i)?.[1] || "";
|
||||||
|
if (rating && !rating.includes("/")) rating = rating + "/10";
|
||||||
|
|
||||||
|
// --- IMDb ID
|
||||||
|
const imdbLink = $("p a[href*='imdb.com']").attr("href") || "";
|
||||||
|
const imdbId =
|
||||||
|
imdbLink && imdbLink.includes("/tt")
|
||||||
|
? "tt" + imdbLink.split("/tt")[1].split("/")[0]
|
||||||
|
: "";
|
||||||
|
|
||||||
|
// --- Download Links
|
||||||
|
const linkList: Link[] = [];
|
||||||
|
const isSeries = $(".download-options-grid").length > 0; // Series tab structure
|
||||||
|
|
||||||
|
if (isSeries) {
|
||||||
|
// --- Series: loop through each download-card
|
||||||
|
$(".download-card").each((_, card) => {
|
||||||
|
const card$ = $(card);
|
||||||
|
const quality = card$.find(".download-quality-text").text().trim();
|
||||||
|
const size = card$.find(".download-size-info").text().trim() || "";
|
||||||
|
const href = card$.find("a.tabs-download-button").attr("href") || "";
|
||||||
|
if (href) {
|
||||||
|
const titleText = `Download ${quality} ${size}`.trim();
|
||||||
|
linkList.push({
|
||||||
|
title: titleText,
|
||||||
|
episodesLink: href,
|
||||||
|
quality: quality || "AUTO",
|
||||||
|
directLinks: [
|
||||||
|
{
|
||||||
|
link: href,
|
||||||
|
title: titleText,
|
||||||
|
type: "series",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// --- Movie: same as before
|
||||||
|
$("a.modern-download-button").each((_, a) => {
|
||||||
|
const parent = $(a).closest(".modern-option-card");
|
||||||
|
const quality = parent.find(".modern-badge").text().trim() || "AUTO";
|
||||||
|
const href = $(a).attr("href") || "";
|
||||||
|
const titleText = `Download ${quality}`;
|
||||||
|
if (href) {
|
||||||
|
linkList.push({
|
||||||
|
title: titleText,
|
||||||
|
episodesLink: href,
|
||||||
|
quality,
|
||||||
|
directLinks: [
|
||||||
|
{
|
||||||
|
link: href,
|
||||||
|
title: titleText,
|
||||||
|
type: "movie",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
title,
|
||||||
|
synopsis,
|
||||||
|
image,
|
||||||
|
imdbId,
|
||||||
|
type: isSeries ? "series" : "movie",
|
||||||
|
tags,
|
||||||
|
cast,
|
||||||
|
rating,
|
||||||
|
linkList,
|
||||||
|
};
|
||||||
|
} catch (err) {
|
||||||
|
console.error("KMMOVIES getMeta error:", err);
|
||||||
|
return {
|
||||||
|
title: "",
|
||||||
|
synopsis: "",
|
||||||
|
image: "https://via.placeholder.com/300x450",
|
||||||
|
imdbId: "",
|
||||||
|
type: "movie",
|
||||||
|
tags: [],
|
||||||
|
cast: [],
|
||||||
|
rating: "",
|
||||||
|
linkList: [],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
144
providers/kmMovies/posts.ts
Normal file
144
providers/kmMovies/posts.ts
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
import { Post, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const defaultHeaders = {
|
||||||
|
Referer: "https://www.google.com",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
|
||||||
|
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
Pragma: "no-cache",
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Normal catalog posts ---
|
||||||
|
export async function getPosts({
|
||||||
|
filter,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({ filter, page, query: "", signal, providerContext });
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Search posts ---
|
||||||
|
export async function getSearchPosts({
|
||||||
|
searchQuery,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
searchQuery: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({
|
||||||
|
filter: "",
|
||||||
|
page,
|
||||||
|
query: searchQuery,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Core function ---
|
||||||
|
async function fetchPosts({
|
||||||
|
filter,
|
||||||
|
query,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
query?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
try {
|
||||||
|
const baseUrl = providerContext.getBaseUrl("kmmovies");
|
||||||
|
let url: string;
|
||||||
|
|
||||||
|
// --- Build URL for category filter or search query
|
||||||
|
if (query && query.trim()) {
|
||||||
|
url = `${baseUrl}/?s=${encodeURIComponent(query)}${
|
||||||
|
page > 1 ? `&paged=${page}` : ""
|
||||||
|
}`;
|
||||||
|
} else if (filter) {
|
||||||
|
url = filter.startsWith("/")
|
||||||
|
? `${baseUrl}${filter.replace(/\/$/, "")}${
|
||||||
|
page > 1 ? `/page/${page}` : ""
|
||||||
|
}`
|
||||||
|
: `${baseUrl}/${filter}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
} else {
|
||||||
|
url = `${baseUrl}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const res = await axios.get(url, { headers: defaultHeaders, signal });
|
||||||
|
const $ = cheerio.load(res.data || "");
|
||||||
|
|
||||||
|
const resolveUrl = (href: string) =>
|
||||||
|
href?.startsWith("http")
|
||||||
|
? href
|
||||||
|
: `${baseUrl}${href.startsWith("/") ? "" : "/"}${href}`;
|
||||||
|
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const catalog: Post[] = [];
|
||||||
|
|
||||||
|
// --- selectors
|
||||||
|
const POST_SELECTORS = [
|
||||||
|
".pstr_box",
|
||||||
|
"article",
|
||||||
|
".result-item",
|
||||||
|
".post",
|
||||||
|
".item",
|
||||||
|
".thumbnail",
|
||||||
|
".latest-movies",
|
||||||
|
".movie-item",
|
||||||
|
].join(",");
|
||||||
|
|
||||||
|
$(POST_SELECTORS).each((_, el) => {
|
||||||
|
const card = $(el);
|
||||||
|
let link = card.find("a[href]").first().attr("href") || "";
|
||||||
|
if (!link) return;
|
||||||
|
link = resolveUrl(link);
|
||||||
|
if (seen.has(link)) return;
|
||||||
|
|
||||||
|
let title =
|
||||||
|
card.find("h2").first().text().trim() ||
|
||||||
|
card.find("a[title]").first().attr("title")?.trim() ||
|
||||||
|
card.text().trim();
|
||||||
|
title = title
|
||||||
|
.replace(/\[.*?\]/g, "")
|
||||||
|
.replace(/\(.+?\)/g, "")
|
||||||
|
.replace(/\s{2,}/g, " ")
|
||||||
|
.trim();
|
||||||
|
if (!title) return;
|
||||||
|
|
||||||
|
const img =
|
||||||
|
card.find("img").first().attr("src") ||
|
||||||
|
card.find("img").first().attr("data-src") ||
|
||||||
|
card.find("img").first().attr("data-original") ||
|
||||||
|
"";
|
||||||
|
const image = img ? resolveUrl(img) : "";
|
||||||
|
|
||||||
|
seen.add(link);
|
||||||
|
catalog.push({ title, link, image });
|
||||||
|
});
|
||||||
|
|
||||||
|
return catalog.slice(0, 100);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(
|
||||||
|
"Cinevood fetchPosts error:",
|
||||||
|
err instanceof Error ? err.message : String(err)
|
||||||
|
);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
70
providers/kmMovies/stream.ts
Normal file
70
providers/kmMovies/stream.ts
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
import { ProviderContext, Stream } from "../types";
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"sec-ch-ua":
|
||||||
|
'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"sec-ch-ua-platform": '"Windows"',
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Sec-Fetch-Site": "none",
|
||||||
|
"Sec-Fetch-User": "?1",
|
||||||
|
"Upgrade-Insecure-Requests": "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getStream({
|
||||||
|
link,
|
||||||
|
type,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
type: string;
|
||||||
|
signal: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}) {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const streamLinks: Stream[] = [];
|
||||||
|
|
||||||
|
// Fetch the page HTML
|
||||||
|
const res = await axios.get(link, { headers, signal });
|
||||||
|
const $ = cheerio.load(res.data);
|
||||||
|
|
||||||
|
const ALLOWED_SERVERS = ["ONE CLICK", "ZIP-ZAP", "ULTRA FAST", "SKYDROP"];
|
||||||
|
// --- Scrape all <a class="download-button"> links
|
||||||
|
$("a.download-button").each((_, el) => {
|
||||||
|
const btn = $(el);
|
||||||
|
const href = btn.attr("href")?.trim();
|
||||||
|
const serverName = btn.text().trim() || "Unknown Server";
|
||||||
|
|
||||||
|
// Check for partial matches in server names
|
||||||
|
const isAllowed = ALLOWED_SERVERS.some(
|
||||||
|
(allowed) =>
|
||||||
|
serverName.toUpperCase().includes(allowed) ||
|
||||||
|
allowed.includes(serverName.toUpperCase())
|
||||||
|
);
|
||||||
|
|
||||||
|
if (href && isAllowed) {
|
||||||
|
streamLinks.push({
|
||||||
|
server: serverName,
|
||||||
|
link: href,
|
||||||
|
type: "mkv", // Boss, mostly KMMOVIES MKV hota hai
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return streamLinks;
|
||||||
|
} catch (error: any) {
|
||||||
|
console.log("getStream error: ", error.message);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
10
providers/movies4u/catalog.ts
Normal file
10
providers/movies4u/catalog.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const catalog = [
|
||||||
|
{
|
||||||
|
title: "Trending",
|
||||||
|
filter: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Anime",
|
||||||
|
filter: "/category/anime/",
|
||||||
|
},
|
||||||
|
];
|
||||||
69
providers/movies4u/episodes.ts
Normal file
69
providers/movies4u/episodes.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import { EpisodeLink, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
// यहाँ `getEpisodes` फ़ंक्शन मान रहा है कि यह उस पेज को स्क्रैप कर रहा है
|
||||||
|
// जो 'Download Links' बटन से प्राप्त हुआ है (जैसे m4ulinks.com/number/42882)
|
||||||
|
|
||||||
|
export const getEpisodes = async function ({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||||
|
console.log("getEpisodeLinks", url);
|
||||||
|
try {
|
||||||
|
// Note: Cookies को URL के आधार पर अपडेट करने की आवश्यकता हो सकती है
|
||||||
|
const res = await axios.get(url, {
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
// Cloudflare/Bot protection के लिए Hardcoded cookie यहाँ आवश्यक हो सकता है
|
||||||
|
cookie:
|
||||||
|
"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=Zl2yiOCN3pzGUd0Bgs.VyBXniJooDbG2Tk1g7DEoRnw-1756381111-1.2.1.1-RVPZoWGCAygGNAHavrVR0YaqASWZlJyYff8A.oQfPB5qbcPrAVud42BzsSwcDgiKAP0gw5D92V3o8XWwLwDRNhyg3DuL1P8wh2K4BCVKxWvcy.iCCxczKtJ8QSUAsAQqsIzRWXk29N6X.kjxuOTYlfB2jrlq12TRDld_zTbsskNcTxaA.XQekUcpGLseYqELuvlNOQU568NZD6LiLn3ICyFThMFAx6mIcgXkxVAvnxU; xla=s4t",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const $ = cheerio.load(res.data);
|
||||||
|
const container = $(".entry-content,.entry-inner, .download-links-div");
|
||||||
|
|
||||||
|
// .unili-content,.code-block-1 जैसे अवांछित तत्वों को हटा दें
|
||||||
|
$(".unili-content,.code-block-1").remove();
|
||||||
|
|
||||||
|
const episodes: EpisodeLink[] = [];
|
||||||
|
|
||||||
|
// HubCloud Links को लक्षित करने के लिए:
|
||||||
|
// 1. Episode Title (h5) से शुरू करें
|
||||||
|
// 2. उसके बाद के downloads-btns-div में HubCloud बटन खोजें
|
||||||
|
|
||||||
|
container.find("h5").each((index, element) => {
|
||||||
|
const el = $(element);
|
||||||
|
const title = el.text().trim(); // e.g., "-:Episodes: 1:- (Grand Premiere)"
|
||||||
|
|
||||||
|
// HubCloud लिंक को विशिष्ट स्टाइल और टेक्स्ट से खोजें
|
||||||
|
// बटन सेलेक्टर: style="background: linear-gradient(135deg,#e629d0,#007bff);color: white;"
|
||||||
|
const hubCloudLink = el
|
||||||
|
.next(".downloads-btns-div")
|
||||||
|
.find(
|
||||||
|
'a[style*="background: linear-gradient(135deg,#e629d0,#007bff);"]'
|
||||||
|
)
|
||||||
|
.attr("href");
|
||||||
|
|
||||||
|
if (title && hubCloudLink) {
|
||||||
|
// टाइटल को साफ़ करें (e.g., सिर्फ़ Episode 1: Grand Premiere रखें)
|
||||||
|
const cleanedTitle = title.replace(/[-:]/g, "").trim();
|
||||||
|
|
||||||
|
episodes.push({
|
||||||
|
title: cleanedTitle,
|
||||||
|
link: hubCloudLink,
|
||||||
|
// यदि यह HubCloud/Streaming लिंक है, तो आप 'type' को यहाँ 'stream' भी सेट कर सकते हैं
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// console.log(episodes);
|
||||||
|
return episodes;
|
||||||
|
} catch (err) {
|
||||||
|
console.log("getEpisodeLinks error: ");
|
||||||
|
// console.error(err);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
167
providers/movies4u/meta.ts
Normal file
167
providers/movies4u/meta.ts
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
import { Info, Link, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
// Headers
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"sec-ch-ua":
|
||||||
|
'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"sec-ch-ua-platform": '"Windows"',
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Sec-Fetch-Site": "none",
|
||||||
|
"Sec-Fetch-User": "?1",
|
||||||
|
Cookie:
|
||||||
|
"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0",
|
||||||
|
"Upgrade-Insecure-Requests": "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getMeta = async function ({
|
||||||
|
link,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Info> {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const url = link;
|
||||||
|
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||||
|
|
||||||
|
const emptyResult: Info = {
|
||||||
|
title: "",
|
||||||
|
synopsis: "",
|
||||||
|
image: "",
|
||||||
|
imdbId: "",
|
||||||
|
type: "movie",
|
||||||
|
linkList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios.get(url, {
|
||||||
|
headers: { ...headers, Referer: baseUrl },
|
||||||
|
});
|
||||||
|
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const infoContainer = $(".entry-content, .post-inner").length
|
||||||
|
? $(".entry-content, .post-inner")
|
||||||
|
: $("body");
|
||||||
|
|
||||||
|
const result: Info = {
|
||||||
|
title: "",
|
||||||
|
synopsis: "",
|
||||||
|
image: "",
|
||||||
|
imdbId: "",
|
||||||
|
type: "movie",
|
||||||
|
linkList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Type determination ---
|
||||||
|
const infoParagraph = $("h2.movie-title").next("p").text();
|
||||||
|
if (
|
||||||
|
infoParagraph.includes("Season:") ||
|
||||||
|
infoParagraph.includes("Episode:") ||
|
||||||
|
infoParagraph.includes("SHOW Name:")
|
||||||
|
) {
|
||||||
|
result.type = "series";
|
||||||
|
} else {
|
||||||
|
result.type = "movie";
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Title ---
|
||||||
|
const rawTitle = $("h1").text().trim() || $("h2").text().trim();
|
||||||
|
result.title = rawTitle.split(/\[| \d+p| x\d+/)[0].trim();
|
||||||
|
const showNameMatch =
|
||||||
|
infoParagraph.match(/SHOW Name: (.+)/) ||
|
||||||
|
infoParagraph.match(/Name: (.+)/);
|
||||||
|
if (showNameMatch && showNameMatch[1]) {
|
||||||
|
result.title = result.title || showNameMatch[1].trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- IMDb ID ---
|
||||||
|
const imdbMatch =
|
||||||
|
infoContainer.html()?.match(/tt\d+/) ||
|
||||||
|
$("a[href*='imdb.com/title/']").attr("href")?.match(/tt\d+/);
|
||||||
|
result.imdbId = imdbMatch ? imdbMatch[0] : "";
|
||||||
|
|
||||||
|
// --- Image ---
|
||||||
|
let image =
|
||||||
|
infoContainer.find(".post-thumbnail img").attr("src") ||
|
||||||
|
infoContainer.find("img[src]").first().attr("src") ||
|
||||||
|
"";
|
||||||
|
if (image.startsWith("//")) image = "https:" + image;
|
||||||
|
else if (image.startsWith("/")) image = baseUrl + image;
|
||||||
|
if (image.includes("no-thumbnail") || image.includes("placeholder"))
|
||||||
|
image = "";
|
||||||
|
result.image = image;
|
||||||
|
|
||||||
|
// --- Synopsis ---
|
||||||
|
result.synopsis =
|
||||||
|
$("h3.movie-title")
|
||||||
|
.filter((i, el) => $(el).text().includes("Storyline"))
|
||||||
|
.next("p")
|
||||||
|
.text()
|
||||||
|
.trim() ||
|
||||||
|
infoContainer.find("p").first().text().trim() ||
|
||||||
|
"";
|
||||||
|
|
||||||
|
// --- LinkList extraction ---
|
||||||
|
const links: Link[] = [];
|
||||||
|
const h4Elements = $(".download-links-div").find("> h4");
|
||||||
|
|
||||||
|
h4Elements.each((index, element) => {
|
||||||
|
const el = $(element);
|
||||||
|
const titleText = el.text().trim();
|
||||||
|
const qualityMatch = titleText.match(/\d+p\b/)?.[0];
|
||||||
|
const fullTitle = titleText;
|
||||||
|
|
||||||
|
const downloadButtons = el.next(".downloads-btns-div").find("a");
|
||||||
|
|
||||||
|
if (downloadButtons.length && qualityMatch) {
|
||||||
|
if (result.type === "series") {
|
||||||
|
links.push({
|
||||||
|
title: fullTitle,
|
||||||
|
quality: qualityMatch,
|
||||||
|
episodesLink: downloadButtons.attr("href") || "",
|
||||||
|
directLinks: [],
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Movie: collect all direct download buttons
|
||||||
|
const directLinks: Link["directLinks"] = [];
|
||||||
|
|
||||||
|
downloadButtons.each((i, btn) => {
|
||||||
|
const btnEl = $(btn);
|
||||||
|
const link = btnEl.attr("href");
|
||||||
|
if (link) {
|
||||||
|
directLinks.push({
|
||||||
|
title: btnEl.text().trim() || "Download",
|
||||||
|
link,
|
||||||
|
type: "movie", // literal type
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (directLinks.length) {
|
||||||
|
links.push({
|
||||||
|
title: fullTitle,
|
||||||
|
quality: qualityMatch,
|
||||||
|
episodesLink: "",
|
||||||
|
directLinks,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
result.linkList = links;
|
||||||
|
return result;
|
||||||
|
} catch (err) {
|
||||||
|
console.log("getMeta error:", err);
|
||||||
|
return emptyResult;
|
||||||
|
}
|
||||||
|
};
|
||||||
142
providers/movies4u/posts.ts
Normal file
142
providers/movies4u/posts.ts
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
import { Post, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const defaultHeaders = {
|
||||||
|
Referer: "https://www.google.com",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
|
||||||
|
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
Pragma: "no-cache",
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Normal catalog posts ---
|
||||||
|
export async function getPosts({
|
||||||
|
filter,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({ filter, page, query: "", signal, providerContext });
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Search posts ---
|
||||||
|
export async function getSearchPosts({
|
||||||
|
searchQuery,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
searchQuery: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({
|
||||||
|
filter: "",
|
||||||
|
page,
|
||||||
|
query: searchQuery,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Core function ---
|
||||||
|
async function fetchPosts({
|
||||||
|
filter,
|
||||||
|
query,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
query?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
try {
|
||||||
|
const baseUrl = await providerContext.getBaseUrl("movies4u");
|
||||||
|
let url: string;
|
||||||
|
|
||||||
|
// --- Build URL for category filter or search query
|
||||||
|
if (query && query.trim()) {
|
||||||
|
url = `${baseUrl}/?s=${encodeURIComponent(query)}${
|
||||||
|
page > 1 ? `&paged=${page}` : ""
|
||||||
|
}`;
|
||||||
|
} else if (filter) {
|
||||||
|
url = filter.startsWith("/")
|
||||||
|
? `${baseUrl}${filter.replace(/\/$/, "")}${
|
||||||
|
page > 1 ? `/page/${page}` : ""
|
||||||
|
}`
|
||||||
|
: `${baseUrl}/${filter}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
} else {
|
||||||
|
url = `${baseUrl}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const res = await axios.get(url, { headers: defaultHeaders, signal });
|
||||||
|
const $ = cheerio.load(res.data || "");
|
||||||
|
|
||||||
|
const resolveUrl = (href: string) =>
|
||||||
|
href?.startsWith("http") ? href : new URL(href, url).href;
|
||||||
|
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const catalog: Post[] = [];
|
||||||
|
|
||||||
|
// --- HDMovie2 selectors
|
||||||
|
const POST_SELECTORS = [
|
||||||
|
".pstr_box",
|
||||||
|
"article",
|
||||||
|
".result-item",
|
||||||
|
".post",
|
||||||
|
".item",
|
||||||
|
".thumbnail",
|
||||||
|
".latest-movies",
|
||||||
|
".movie-item",
|
||||||
|
].join(",");
|
||||||
|
|
||||||
|
$(POST_SELECTORS).each((_, el) => {
|
||||||
|
const card = $(el);
|
||||||
|
let link = card.find("a[href]").first().attr("href") || "";
|
||||||
|
if (!link) return;
|
||||||
|
link = resolveUrl(link);
|
||||||
|
if (seen.has(link)) return;
|
||||||
|
|
||||||
|
let title =
|
||||||
|
card.find("h2").first().text().trim() ||
|
||||||
|
card.find("a[title]").first().attr("title")?.trim() ||
|
||||||
|
card.text().trim();
|
||||||
|
title = title
|
||||||
|
.replace(/\[.*?\]/g, "")
|
||||||
|
.replace(/\(.+?\)/g, "")
|
||||||
|
.replace(/\s{2,}/g, " ")
|
||||||
|
.trim();
|
||||||
|
if (!title) return;
|
||||||
|
|
||||||
|
const img =
|
||||||
|
card.find("img").first().attr("src") ||
|
||||||
|
card.find("img").first().attr("data-src") ||
|
||||||
|
card.find("img").first().attr("data-original") ||
|
||||||
|
"";
|
||||||
|
const image = img ? resolveUrl(img) : "";
|
||||||
|
|
||||||
|
seen.add(link);
|
||||||
|
catalog.push({ title, link, image });
|
||||||
|
});
|
||||||
|
|
||||||
|
return catalog.slice(0, 100);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(
|
||||||
|
"HDMovie2 fetchPosts error:",
|
||||||
|
err instanceof Error ? err.message : String(err)
|
||||||
|
);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
117
providers/movies4u/stream.ts
Normal file
117
providers/movies4u/stream.ts
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
import { ProviderContext, Stream } from "../types";
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"sec-ch-ua":
|
||||||
|
'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"sec-ch-ua-platform": '"Windows"',
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Sec-Fetch-Site": "none",
|
||||||
|
"Sec-Fetch-User": "?1",
|
||||||
|
Cookie:
|
||||||
|
"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0",
|
||||||
|
"Upgrade-Insecure-Requests": "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getStream({
|
||||||
|
link,
|
||||||
|
type,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
type: string;
|
||||||
|
signal: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}) {
|
||||||
|
const { axios, cheerio, extractors } = providerContext;
|
||||||
|
const { hubcloudExtracter } = extractors;
|
||||||
|
try {
|
||||||
|
const streamLinks: Stream[] = [];
|
||||||
|
console.log("dotlink", link);
|
||||||
|
if (type === "movie") {
|
||||||
|
// vlink
|
||||||
|
const dotlinkRes = await axios(`${link}`, { headers });
|
||||||
|
const dotlinkText = dotlinkRes.data;
|
||||||
|
// console.log('dotlinkText', dotlinkText);
|
||||||
|
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
|
||||||
|
// console.log('vLink', vlink[1]);
|
||||||
|
link = vlink[1];
|
||||||
|
|
||||||
|
// filepress link
|
||||||
|
try {
|
||||||
|
const $ = cheerio.load(dotlinkText);
|
||||||
|
const filepressLink = $(
|
||||||
|
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||||
|
)
|
||||||
|
.parent()
|
||||||
|
.attr("href");
|
||||||
|
// console.log('filepressLink', filepressLink);
|
||||||
|
const filepressID = filepressLink?.split("/").pop();
|
||||||
|
const filepressBaseUrl = filepressLink
|
||||||
|
?.split("/")
|
||||||
|
.slice(0, -2)
|
||||||
|
.join("/");
|
||||||
|
// console.log('filepressID', filepressID);
|
||||||
|
// console.log('filepressBaseUrl', filepressBaseUrl);
|
||||||
|
const filepressTokenRes = await axios.post(
|
||||||
|
filepressBaseUrl + "/api/file/downlaod/",
|
||||||
|
{
|
||||||
|
id: filepressID,
|
||||||
|
method: "indexDownlaod",
|
||||||
|
captchaValue: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Referer: filepressBaseUrl,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||||
|
if (filepressTokenRes.data?.status) {
|
||||||
|
const filepressToken = filepressTokenRes.data?.data;
|
||||||
|
const filepressStreamLink = await axios.post(
|
||||||
|
filepressBaseUrl + "/api/file/downlaod2/",
|
||||||
|
{
|
||||||
|
id: filepressToken,
|
||||||
|
method: "indexDownlaod",
|
||||||
|
captchaValue: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Referer: filepressBaseUrl,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||||
|
streamLinks.push({
|
||||||
|
server: "filepress",
|
||||||
|
link: filepressStreamLink.data?.data?.[0],
|
||||||
|
type: "mkv",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("filepress error: ");
|
||||||
|
// console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return await hubcloudExtracter(link, signal);
|
||||||
|
} catch (error: any) {
|
||||||
|
console.log("getStream error: ", error);
|
||||||
|
if (error.message.includes("Aborted")) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
10
providers/zeefliz/catalog.ts
Normal file
10
providers/zeefliz/catalog.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
export const catalog = [
|
||||||
|
{
|
||||||
|
title: "Trending",
|
||||||
|
filter: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Shows",
|
||||||
|
filter: "category/web-series/",
|
||||||
|
},
|
||||||
|
];
|
||||||
46
providers/zeefliz/episodes.ts
Normal file
46
providers/zeefliz/episodes.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
import { EpisodeLink, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
export const getEpisodes = async function ({
|
||||||
|
url,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
url: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<EpisodeLink[]> {
|
||||||
|
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||||
|
console.log("getEpisodeLinks", url);
|
||||||
|
try {
|
||||||
|
const res = await axios.get(url, {
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
cookie:
|
||||||
|
"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=Zl2yiOCN3pzGUd0Bgs.VyBXniJooDbG2Tk1g7DEoRnw-1756381111-1.2.1.1-RVPZoWGCAygGNAHavrVR0YaqASWZlJyYff8A.oQfPB5qbcPrAVud42BzsSwcDgiKAP0gw5D92V3o8XWwLwDRNhyg3DuL1P8wh2K4BCVKxWvcy.iCCxczKtJ8QSUAsAQqsIzRWXk29N6X.kjxuOTYlfB2jrlq12TRDld_zTbsskNcTxaA.XQekUcpGLseYqELuvlNOQU568NZD6LiLn3ICyFThMFAx6mIcgXkxVAvnxU; xla=s4t",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const $ = cheerio.load(res.data);
|
||||||
|
const container = $(".entry-content,.entry-inner");
|
||||||
|
$(".unili-content,.code-block-1").remove();
|
||||||
|
const episodes: EpisodeLink[] = [];
|
||||||
|
container.find("h4").each((index, element) => {
|
||||||
|
const el = $(element);
|
||||||
|
const title = el.text().replace(/-/g, "").replace(/:/g, "");
|
||||||
|
const link = el
|
||||||
|
.next("p")
|
||||||
|
.find(
|
||||||
|
'.btn-outline[style="background:linear-gradient(135deg,#ed0b0b,#f2d152); color: white;"]'
|
||||||
|
)
|
||||||
|
.parent()
|
||||||
|
.attr("href");
|
||||||
|
if (title && link) {
|
||||||
|
episodes.push({ title, link });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// console.log(episodes);
|
||||||
|
return episodes;
|
||||||
|
} catch (err) {
|
||||||
|
console.log("getEpisodeLinks error: ");
|
||||||
|
// console.error(err);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
144
providers/zeefliz/meta.ts
Normal file
144
providers/zeefliz/meta.ts
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
import { Info, Link, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
// Headers
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"sec-ch-ua":
|
||||||
|
'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"sec-ch-ua-platform": '"Windows"',
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Sec-Fetch-Site": "none",
|
||||||
|
"Sec-Fetch-User": "?1",
|
||||||
|
"Upgrade-Insecure-Requests": "1",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getMeta = async function ({
|
||||||
|
link,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Info> {
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const url = link;
|
||||||
|
const baseUrl = url.split("/").slice(0, 3).join("/");
|
||||||
|
|
||||||
|
const emptyResult: Info = {
|
||||||
|
title: "",
|
||||||
|
synopsis: "",
|
||||||
|
image: "",
|
||||||
|
imdbId: "",
|
||||||
|
type: "movie",
|
||||||
|
linkList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios.get(url, {
|
||||||
|
headers: { ...headers, Referer: baseUrl },
|
||||||
|
});
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const content = $(".entry-content, .post-inner").length
|
||||||
|
? $(".entry-content, .post-inner")
|
||||||
|
: $("body");
|
||||||
|
|
||||||
|
const result: Info = {
|
||||||
|
title: "",
|
||||||
|
synopsis: "",
|
||||||
|
image: "",
|
||||||
|
imdbId: "",
|
||||||
|
type: "movie",
|
||||||
|
linkList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Title ---
|
||||||
|
let rawTitle = content.find("h1, h2").first().text().trim();
|
||||||
|
rawTitle = rawTitle.replace(/^Download\s*/i, ""); // Download text remove
|
||||||
|
result.title = rawTitle;
|
||||||
|
|
||||||
|
// --- Type Detect ---
|
||||||
|
const pageText = content.text();
|
||||||
|
if (/Season\s*\d+/i.test(pageText) || /Episode\s*\d+/i.test(pageText)) {
|
||||||
|
result.type = "series";
|
||||||
|
} else {
|
||||||
|
result.type = "movie";
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- IMDb ID ---
|
||||||
|
const imdbHref = content.find("a[href*='imdb.com/title/']").attr("href");
|
||||||
|
const imdbMatch = imdbHref?.match(/tt\d+/);
|
||||||
|
result.imdbId = imdbMatch ? imdbMatch[0] : "";
|
||||||
|
|
||||||
|
// --- Image ---
|
||||||
|
let image =
|
||||||
|
content.find("img").first().attr("data-src") ||
|
||||||
|
content.find("img").first().attr("src") ||
|
||||||
|
"";
|
||||||
|
if (image.startsWith("//")) image = "https:" + image;
|
||||||
|
else if (image.startsWith("/")) image = baseUrl + image;
|
||||||
|
if (image.includes("no-thumbnail") || image.includes("placeholder"))
|
||||||
|
image = "";
|
||||||
|
result.image = image;
|
||||||
|
|
||||||
|
// --- Synopsis ---
|
||||||
|
result.synopsis = content.find("p").first().text().trim() || "";
|
||||||
|
|
||||||
|
// --- Download Links Extraction ---
|
||||||
|
const links: Link[] = [];
|
||||||
|
|
||||||
|
if (result.type === "series") {
|
||||||
|
// ✅ Series case: सिर्फ V-Cloud वाला और title = पूरा <h3> का text
|
||||||
|
content.find("h3").each((_, h3) => {
|
||||||
|
const h3Text = $(h3).text().trim();
|
||||||
|
const qualityMatch = h3Text.match(/\d+p/)?.[0] || "";
|
||||||
|
|
||||||
|
const vcloudLink = $(h3)
|
||||||
|
.next("p")
|
||||||
|
.find("a")
|
||||||
|
.filter((_, a) => /v-cloud/i.test($(a).text()))
|
||||||
|
.first();
|
||||||
|
|
||||||
|
const href = vcloudLink.attr("href");
|
||||||
|
if (href) {
|
||||||
|
links.push({
|
||||||
|
title: h3Text,
|
||||||
|
quality: qualityMatch,
|
||||||
|
episodesLink: href, // Episode button
|
||||||
|
directLinks: [], // Empty for series
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// ✅ Movie case: h5 text as title + download link
|
||||||
|
content.find("h5").each((_, h5) => {
|
||||||
|
const h5Text = $(h5).text().trim();
|
||||||
|
const qualityMatch = h5Text.match(/\d+p/)?.[0] || "";
|
||||||
|
|
||||||
|
const href = $(h5).next("p").find("a").attr("href");
|
||||||
|
if (href) {
|
||||||
|
links.push({
|
||||||
|
title: h5Text,
|
||||||
|
quality: qualityMatch,
|
||||||
|
episodesLink: "",
|
||||||
|
directLinks: [
|
||||||
|
{ title: "Movie", link: href, type: "movie" }, // Play/Download button
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
result.linkList = links;
|
||||||
|
return result;
|
||||||
|
} catch (err) {
|
||||||
|
console.error("getMeta error:", err instanceof Error ? err.message : err);
|
||||||
|
return emptyResult;
|
||||||
|
}
|
||||||
|
};
|
||||||
135
providers/zeefliz/posts.ts
Normal file
135
providers/zeefliz/posts.ts
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
import { Post, ProviderContext } from "../types";
|
||||||
|
|
||||||
|
const defaultHeaders = {
|
||||||
|
Referer: "https://www.google.com",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " +
|
||||||
|
"(KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
|
||||||
|
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
Pragma: "no-cache",
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Normal catalog posts ---
|
||||||
|
export async function getPosts({
|
||||||
|
filter,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({ filter, page, query: "", signal, providerContext });
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Search posts ---
|
||||||
|
export async function getSearchPosts({
|
||||||
|
searchQuery,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
searchQuery: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
return fetchPosts({
|
||||||
|
filter: "",
|
||||||
|
page,
|
||||||
|
query: searchQuery,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Core function ---
|
||||||
|
async function fetchPosts({
|
||||||
|
filter,
|
||||||
|
query,
|
||||||
|
page = 1,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
filter?: string;
|
||||||
|
query?: string;
|
||||||
|
page?: number;
|
||||||
|
signal?: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}): Promise<Post[]> {
|
||||||
|
try {
|
||||||
|
const baseUrl = await providerContext.getBaseUrl("zeefliz");
|
||||||
|
let url: string;
|
||||||
|
|
||||||
|
if (query && query.trim()) {
|
||||||
|
const params = new URLSearchParams();
|
||||||
|
params.append("s", query.trim());
|
||||||
|
if (page > 1) params.append("paged", page.toString());
|
||||||
|
url = `${baseUrl}/?${params.toString()}`;
|
||||||
|
} else if (filter) {
|
||||||
|
url = filter.startsWith("/")
|
||||||
|
? `${baseUrl}${filter.replace(/\/$/, "")}${
|
||||||
|
page > 1 ? `/page/${page}` : ""
|
||||||
|
}`
|
||||||
|
: `${baseUrl}/${filter}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
} else {
|
||||||
|
url = `${baseUrl}${page > 1 ? `/page/${page}` : ""}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { axios, cheerio } = providerContext;
|
||||||
|
const res = await axios.get(url, { headers: defaultHeaders, signal });
|
||||||
|
const $ = cheerio.load(res.data || "");
|
||||||
|
|
||||||
|
const resolveUrl = (href: string) =>
|
||||||
|
href?.startsWith("http") ? href : new URL(href, baseUrl).href;
|
||||||
|
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const catalog: Post[] = [];
|
||||||
|
|
||||||
|
// --- ZeeFliz specific selectors ---
|
||||||
|
$("section.site-main article.post").each((_, el) => {
|
||||||
|
const card = $(el);
|
||||||
|
|
||||||
|
let link = card.find("a[href]").first().attr("href") || "";
|
||||||
|
if (!link) return;
|
||||||
|
link = resolveUrl(link);
|
||||||
|
if (seen.has(link)) return;
|
||||||
|
|
||||||
|
// Title
|
||||||
|
let title =
|
||||||
|
card.find("h3.entry-title a").text().trim() ||
|
||||||
|
card.find("a[rel='bookmark']").text().trim() ||
|
||||||
|
card.find("a[title]").attr("title")?.trim() ||
|
||||||
|
"";
|
||||||
|
|
||||||
|
// ✅ Remove only "Download" text from title
|
||||||
|
title = title.replace(/^Download\s*/i, "").trim();
|
||||||
|
|
||||||
|
if (!title) return;
|
||||||
|
|
||||||
|
// Image
|
||||||
|
let img =
|
||||||
|
card.find("img").attr("bv-data-src") ||
|
||||||
|
card.find("img").attr("src") ||
|
||||||
|
card.find("img").attr("data-src") ||
|
||||||
|
card.find("img").attr("data-original") ||
|
||||||
|
"";
|
||||||
|
const image = img ? resolveUrl(img) : "";
|
||||||
|
|
||||||
|
seen.add(link);
|
||||||
|
catalog.push({ title, link, image });
|
||||||
|
});
|
||||||
|
|
||||||
|
return catalog.slice(0, 100);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(
|
||||||
|
"fetchPosts error:",
|
||||||
|
err instanceof Error ? err.message : String(err)
|
||||||
|
);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
116
providers/zeefliz/stream.ts
Normal file
116
providers/zeefliz/stream.ts
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
import { ProviderContext, Stream } from "../types";
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
Accept:
|
||||||
|
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
||||||
|
"Cache-Control": "no-store",
|
||||||
|
"Accept-Language": "en-US,en;q=0.9",
|
||||||
|
DNT: "1",
|
||||||
|
"sec-ch-ua":
|
||||||
|
'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',
|
||||||
|
"sec-ch-ua-mobile": "?0",
|
||||||
|
"sec-ch-ua-platform": '"Windows"',
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Sec-Fetch-Site": "none",
|
||||||
|
"Sec-Fetch-User": "?1",
|
||||||
|
Cookie:
|
||||||
|
"ext_name=ojplmecpdpgccookcobabopnaifgidhf; cf_clearance=nJQQ9ncb6m2Nc7HoxzuphPhnQgLzI6nBmzl2D.9oY4E-1759137994-1.2.1.1-pe7DiQHVsfZjnbHWTnaNbMiTYEuk.VvpPGaMeTtHOh7p9TKG5auBIDGDDW93devKuNcOlkhe6mk4v5OcsM0H_q3Te02eCPoTNgZsW8terjwvnQUebbbe8QKjMaVsVKgnbiAxS2ESM9aB3fbiQ9diuNT6ziY.2U4mPaJ0Y4vCu3404o5qBEw5c2psIuabKUTZviA2NJvN.lx5jAFQnB.HXeXJnUuCcbQac7G1BYBfdso",
|
||||||
|
"User-Agent":
|
||||||
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getStream({
|
||||||
|
link,
|
||||||
|
type,
|
||||||
|
signal,
|
||||||
|
providerContext,
|
||||||
|
}: {
|
||||||
|
link: string;
|
||||||
|
type: string;
|
||||||
|
signal: AbortSignal;
|
||||||
|
providerContext: ProviderContext;
|
||||||
|
}) {
|
||||||
|
const { axios, cheerio, extractors } = providerContext;
|
||||||
|
const { hubcloudExtracter } = extractors;
|
||||||
|
try {
|
||||||
|
const streamLinks: Stream[] = [];
|
||||||
|
console.log("dotlink", link);
|
||||||
|
if (type === "movie") {
|
||||||
|
// vlink
|
||||||
|
const dotlinkRes = await axios(`${link}`, { headers });
|
||||||
|
const dotlinkText = dotlinkRes.data;
|
||||||
|
console.log("dotlinkText", dotlinkText);
|
||||||
|
const vlink = dotlinkText.match(/<a\s+href="([^"]*cloud\.[^"]*)"/i) || [];
|
||||||
|
console.log("vLink", vlink[1]);
|
||||||
|
link = vlink[1];
|
||||||
|
|
||||||
|
// filepress link
|
||||||
|
try {
|
||||||
|
const $ = cheerio.load(dotlinkText);
|
||||||
|
const filepressLink = $(
|
||||||
|
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||||
|
)
|
||||||
|
.parent()
|
||||||
|
.attr("href");
|
||||||
|
// console.log('filepressLink', filepressLink);
|
||||||
|
const filepressID = filepressLink?.split("/").pop();
|
||||||
|
const filepressBaseUrl = filepressLink
|
||||||
|
?.split("/")
|
||||||
|
.slice(0, -2)
|
||||||
|
.join("/");
|
||||||
|
// console.log('filepressID', filepressID);
|
||||||
|
// console.log('filepressBaseUrl', filepressBaseUrl);
|
||||||
|
const filepressTokenRes = await axios.post(
|
||||||
|
filepressBaseUrl + "/api/file/downlaod/",
|
||||||
|
{
|
||||||
|
id: filepressID,
|
||||||
|
method: "indexDownlaod",
|
||||||
|
captchaValue: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Referer: filepressBaseUrl,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||||
|
if (filepressTokenRes.data?.status) {
|
||||||
|
const filepressToken = filepressTokenRes.data?.data;
|
||||||
|
const filepressStreamLink = await axios.post(
|
||||||
|
filepressBaseUrl + "/api/file/downlaod2/",
|
||||||
|
{
|
||||||
|
id: filepressToken,
|
||||||
|
method: "indexDownlaod",
|
||||||
|
captchaValue: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
Referer: filepressBaseUrl,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||||
|
streamLinks.push({
|
||||||
|
server: "filepress",
|
||||||
|
link: filepressStreamLink.data?.data?.[0],
|
||||||
|
type: "mkv",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("filepress error: ");
|
||||||
|
// console.error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return await hubcloudExtracter(link, signal);
|
||||||
|
} catch (error: any) {
|
||||||
|
console.log("getStream error: ", error);
|
||||||
|
if (error.message.includes("Aborted")) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user