This commit is contained in:
himanshu8443
2025-07-11 19:17:23 +05:30
parent 6ca69cf93b
commit 13f71510d5
139 changed files with 139 additions and 10578 deletions

View File

@@ -1,22 +1 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.genres = exports.catalog = void 0;
exports.catalog = [
{
title: "Telugu Movies",
filter: "/category/Telugu-(2025)-Movies.html",
},
{
title: "Tamil Movies",
filter: "/category/Tamil-(2025)-Movies.html",
},
{
title: "Hollywood Telugu Dubbed",
filter: "/category/Telugu-Dubbed-Hollywood-Movies-Complete-Set.html",
},
{
title: "Web Series",
filter: "/category/Telugu-Web-Series.html",
},
];
exports.genres = [];
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.genres=exports.catalog=void 0,exports.catalog=[{title:"Telugu Movies",filter:"/category/Telugu-(2025)-Movies.html"},{title:"Tamil Movies",filter:"/category/Tamil-(2025)-Movies.html"},{title:"Hollywood Telugu Dubbed",filter:"/category/Telugu-Dubbed-Hollywood-Movies-Complete-Set.html"},{title:"Web Series",filter:"/category/Telugu-Web-Series.html"}],exports.genres=[];

View File

@@ -1,46 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
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) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0;
const getEpisodes = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ url, providerContext, }) {
const { axios, cheerio, getBaseUrl } = providerContext;
try {
const res = yield axios.get(url);
const baseUrl = yield getBaseUrl("moviezwap");
const html = res.data;
const $ = cheerio.load(html);
const episodeLinks = [];
$('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((i, el) => {
var _a;
const downloadPage = ((_a = $(el).attr("href")) === null || _a === void 0 ? void 0 : _a.replace("dwload.php", "download.php")) || "";
let text = $(el).text().trim();
if (text.includes("Download page")) {
// Remove "Download" from the text
text = "Play";
}
if (downloadPage && text) {
// Only add links with quality in text
episodeLinks.push({
title: text,
link: baseUrl + downloadPage,
});
}
});
return episodeLinks;
}
catch (err) {
console.error(err);
return [];
}
});
};
exports.getEpisodes = getEpisodes;
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(i,r){function a(e){try{d(n.next(e))}catch(e){r(e)}}function s(e){try{d(n.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o(function(e){e(t)})).then(a,s)}d((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(e){return __awaiter(this,arguments,void 0,function*({url:e,providerContext:t}){const{axios:o,cheerio:n,getBaseUrl:i}=t;try{const t=yield o.get(e),r=yield i("moviezwap"),a=t.data,s=n.load(a),d=[];return s('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((e,t)=>{var o;const n=(null===(o=s(t).attr("href"))||void 0===o?void 0:o.replace("dwload.php","download.php"))||"";let i=s(t).text().trim();i.includes("Download page")&&(i="Play"),n&&i&&d.push({title:i,link:r+n})}),d}catch(e){return[]}})};exports.getEpisodes=getEpisodes;

107
dist/moviezwap/meta.js vendored
View File

@@ -1,106 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
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) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ link, providerContext, }) {
try {
const { axios, cheerio, getBaseUrl } = providerContext;
const baseUrl = yield getBaseUrl("moviezwap");
const url = link.startsWith("http") ? link : `${baseUrl}${link}`;
const res = yield axios.get(url);
const data = res.data;
const $ = cheerio.load(data);
// 1. Poster image find image with width 260
let image = $('img[width="260"]').attr("src") || "";
if (image && !image.startsWith("http")) {
image = baseUrl + image;
}
const tags = $("font[color='steelblue']")
.map((i, el) => $(el).text().trim())
.get()
.slice(0, 2);
// 2. Title
const title = $("title").text().replace(" - MoviezWap", "").trim() || "";
// 3. Info table
let synopsis = "";
let imdbId = "";
let type = "movie";
let infoRows = [];
$("td:contains('Movie Information')")
.parent()
.nextAll("tr")
.each((i, el) => {
const tds = $(el).find("td");
if (tds.length === 2) {
const key = tds.eq(0).text().trim();
const value = tds.eq(1).text().trim();
infoRows.push(`${key}: ${value}`);
if (key.toLowerCase().includes("plot"))
synopsis = value;
if (key.toLowerCase().includes("imdb"))
imdbId = value;
}
});
if (!synopsis) {
// fallback: try to find a <p> with plot
synopsis = $("p:contains('plot')").text().trim();
}
// 4. Download links (multiple qualities)
const links = [];
$('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((i, el) => {
var _a;
const downloadPage = ((_a = $(el).attr("href")) === null || _a === void 0 ? void 0 : _a.replace("dwload.php", "download.php")) || "";
const text = $(el).text().trim();
if (downloadPage && /\d+p/i.test(text)) {
// Only add links with quality in text
links.push({
title: text,
directLinks: [{ title: "Movie", link: baseUrl + downloadPage }],
});
}
});
$("img[src*='/images/play.png']").each((i, el) => {
const downloadPage = $(el).siblings("a").attr("href");
const text = $(el).siblings("a").text().trim();
console.log("Found link:🔥🔥", text, downloadPage);
if (downloadPage && text) {
links.push({
title: text,
episodesLink: baseUrl + downloadPage,
});
}
});
return {
title,
synopsis,
image,
imdbId,
tags,
type,
linkList: links,
//info: infoRows.join("\n"),
};
}
catch (err) {
console.error(err);
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
});
};
exports.getMeta = getMeta;
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))(function(o,a){function r(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,s)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMeta=void 0;const getMeta=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{axios:i,cheerio:n,getBaseUrl:o}=e,a=yield o("moviezwap"),r=t.startsWith("http")?t:`${a}${t}`,s=(yield i.get(r)).data,l=n.load(s);let c=l('img[width="260"]').attr("src")||"";c&&!c.startsWith("http")&&(c=a+c);const p=l("font[color='steelblue']").map((t,e)=>l(e).text().trim()).get().slice(0,2),d=l("title").text().replace(" - MoviezWap","").trim()||"";let h="",u="",m="movie",f=[];l("td:contains('Movie Information')").parent().nextAll("tr").each((t,e)=>{const i=l(e).find("td");if(2===i.length){const t=i.eq(0).text().trim(),e=i.eq(1).text().trim();f.push(`${t}: ${e}`),t.toLowerCase().includes("plot")&&(h=e),t.toLowerCase().includes("imdb")&&(u=e)}}),h||(h=l("p:contains('plot')").text().trim());const g=[];return l('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((t,e)=>{var i;const n=(null===(i=l(e).attr("href"))||void 0===i?void 0:i.replace("dwload.php","download.php"))||"",o=l(e).text().trim();n&&/\d+p/i.test(o)&&g.push({title:o,directLinks:[{title:"Movie",link:a+n}]})}),l("img[src*='/images/play.png']").each((t,e)=>{const i=l(e).siblings("a").attr("href"),n=l(e).siblings("a").text().trim();i&&n&&g.push({title:n,episodesLink:a+i})}),{title:d,synopsis:h,image:c,imdbId:u,tags:p,type:m,linkList:g}}catch(t){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})};exports.getMeta=getMeta;

View File

@@ -1,57 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
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) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ filter, page, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext;
const baseUrl = yield getBaseUrl("moviezwap");
const url = `${baseUrl}${filter}`;
return posts({ url, signal, cheerio });
});
};
exports.getPosts = getPosts;
const getSearchPosts = function (_a) {
return __awaiter(this, arguments, void 0, function* ({ searchQuery, page, signal, providerContext, }) {
const { getBaseUrl, cheerio } = providerContext;
const baseUrl = yield getBaseUrl("moviezwap");
const url = `${baseUrl}/search.php?q=${encodeURIComponent(searchQuery)}`;
return posts({ url, signal, cheerio });
});
};
exports.getSearchPosts = getSearchPosts;
function posts(_a) {
return __awaiter(this, arguments, void 0, function* ({ url, signal, cheerio, }) {
try {
const res = yield fetch(url, { signal });
const data = yield res.text();
const $ = cheerio.load(data);
const catalog = [];
$('a[href^="/movie/"]').each((i, el) => {
const title = $(el).text().trim();
const link = $(el).attr("href");
const image = "";
if (title && link) {
catalog.push({
title: title,
link: link,
image: image,
});
}
});
return catalog;
}
catch (err) {
console.error("moviezwapGetPosts error ", err);
return [];
}
});
}
"use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(s,a)}c((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSearchPosts=exports.getPosts=void 0;const getPosts=function(t){return __awaiter(this,arguments,void 0,function*({filter:t,page:e,signal:r,providerContext:o}){const{getBaseUrl:n,cheerio:i}=o;return posts({url:`${yield n("moviezwap")}${t}`,signal:r,cheerio:i})})};exports.getPosts=getPosts;const getSearchPosts=function(t){return __awaiter(this,arguments,void 0,function*({searchQuery:t,page:e,signal:r,providerContext:o}){const{getBaseUrl:n,cheerio:i}=o;return posts({url:`${yield n("moviezwap")}/search.php?q=${encodeURIComponent(t)}`,signal:r,cheerio:i})})};function posts(t){return __awaiter(this,arguments,void 0,function*({url:t,signal:e,cheerio:r}){try{const o=yield fetch(t,{signal:e}),n=yield o.text(),i=r.load(n),s=[];return i('a[href^="/movie/"]').each((t,e)=>{const r=i(e).text().trim(),o=i(e).attr("href");r&&o&&s.push({title:r,link:o,image:""})}),s}catch(t){return[]}})}exports.getSearchPosts=getSearchPosts;

View File

@@ -1,35 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
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) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = getStream;
function getStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
const { axios, cheerio, commonHeaders: headers } = providerContext;
const res = yield axios.get(link, { headers, signal });
const html = res.data;
const $ = cheerio.load(html);
const Streams = [];
// Find the actual .mp4 download link
let downloadLink = null;
$('a:contains("Fast Download Server")').each((i, el) => {
const href = $(el).attr("href");
if (href && href.toLocaleLowerCase().includes(".mp4")) {
Streams.push({
link: href,
type: "mp4",
server: "Fast Download",
headers: headers,
});
}
});
return Streams;
});
}
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}c((a=a.apply(e,t||[])).next())})};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,signal:t,providerContext:n}){const{axios:a,cheerio:r,commonHeaders:o}=n,i=(yield a.get(e,{headers:o,signal:t})).data,s=r.load(i),c=[];return s('a:contains("Fast Download Server")').each((e,t)=>{const n=s(t).attr("href");n&&n.toLocaleLowerCase().includes(".mp4")&&c.push({link:n,type:"mp4",server:"Fast Download",headers:o})}),c})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;