This commit is contained in:
himanshu8443
2025-06-17 21:32:50 +05:30
parent 1b23125dfd
commit a2afb200ad
264 changed files with 0 additions and 16201 deletions

View File

@@ -1,29 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.genres = exports.catalog = void 0;
exports.catalog = [
{
title: "Latest",
filter: "",
},
{
title: "Hollywood",
filter: "/category/hollywood",
},
{
title: "Bollywood",
filter: "/category/bollywood",
},
{
title: "Web Series",
filter: "/category/web-series",
},
];
exports.genres = [
{ title: "South", filter: "/category/hindi-dubbed-movies/south-indian" },
{ title: "Punjabi", filter: "/category/punjabi" },
{ title: "Marathi", filter: "/category/bollywood/marathi" },
{ title: "Gujarati", filter: "/category/gujarati" },
{ title: "Bollywood", filter: "/category/bollywood" },
{ title: "Hollywood", filter: "/category/hollywood" },
];

View File

@@ -1,37 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEpisodes = void 0;
const getEpisodes = async function ({ url, providerContext, }) {
const { axios, cheerio } = providerContext;
try {
const res = await axios.get(url);
const html = res.data;
let $ = cheerio.load(html);
const episodeLinks = [];
$('strong:contains("Episode"),strong:contains("1080"),strong:contains("720"),strong:contains("480")').map((i, element) => {
const title = $(element).text();
const link = $(element)
.parent()
.parent()
.next("h4")
.find("a")
.attr("href");
if (link && !title.includes("zip")) {
episodeLinks.push({
title: title,
link,
});
}
});
return episodeLinks;
}
catch (err) {
return [
{
title: "Server 1",
link: url,
},
];
}
};
exports.getEpisodes = getEpisodes;

17
dist/world4u/index.js vendored
View File

@@ -1,17 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.world4u = void 0;
const catalog_1 = require("./catalog");
const world4uGetEpisodeLinks_1 = require("./world4uGetEpisodeLinks");
const world4uGetInfo_1 = require("./world4uGetInfo");
const world4uGetPosts_1 = require("./world4uGetPosts");
const world4uGetStream_1 = require("./world4uGetStream");
exports.world4u = {
catalog: catalog_1.world4uCatalogList,
genres: catalog_1.world4uGenresList,
GetMetaData: world4uGetInfo_1.world4uGetInfo,
GetHomePosts: world4uGetPosts_1.world4uGetPosts,
GetStream: world4uGetStream_1.world4uGetStream,
GetEpisodeLinks: world4uGetEpisodeLinks_1.world4uGetEpisodeLinks,
GetSearchPosts: world4uGetPosts_1.world4uGetPostsSearch,
};

76
dist/world4u/meta.js vendored
View File

@@ -1,76 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMeta = void 0;
const getMeta = async function ({ link, providerContext, }) {
try {
const { axios, cheerio } = providerContext;
const url = link;
const res = await axios.get(url);
const data = res.data;
const $ = cheerio.load(data);
const type = $(".entry-content")
.text()
.toLocaleLowerCase()
.includes("movie name")
? "movie"
: "series";
const imdbId = $(".imdb_left").find("a").attr("href")?.split("/")[4] || "";
const title = $(".entry-content")
.find('strong:contains("Name")')
.children()
.remove()
.end()
.text()
.replace(":", "");
const synopsis = $(".entry-content")
.find('p:contains("Synopsis"),p:contains("Plot"),p:contains("Story")')
.children()
.remove()
.end()
.text();
const image = $(".wp-caption").find("img").attr("data-src") ||
$(".entry-content").find("img").attr("data-src") ||
"";
const links = [];
$(".my-button").map((i, element) => {
const title = $(element).parent().parent().prev().text();
const episodesLink = $(element).attr("href");
const quality = title.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || "";
if (episodesLink && title) {
links.push({
title,
episodesLink: type === "series" ? episodesLink : "",
directLinks: type === "movie"
? [
{
link: episodesLink,
title,
type: "movie",
},
]
: [],
quality,
});
}
});
return {
title,
synopsis,
image,
imdbId,
type,
linkList: links,
};
}
catch (err) {
return {
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}
};
exports.getMeta = getMeta;

48
dist/world4u/posts.js vendored
View File

@@ -1,48 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSearchPosts = exports.getPosts = void 0;
const getPosts = async function ({ filter, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("w4u");
const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, axios, cheerio });
};
exports.getPosts = getPosts;
const getSearchPosts = async function ({ searchQuery, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl("w4u");
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, axios, cheerio });
};
exports.getSearchPosts = getSearchPosts;
async function posts({ url, signal, axios, cheerio, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data);
const catalog = [];
$(".recent-posts")
.children()
.map((i, element) => {
const title = $(element).find(".post-thumb").find("a").attr("title");
const link = $(element).find(".post-thumb").find("a").attr("href");
const image = $(element).find(".post-thumb").find("img").attr("data-src") ||
$(element).find(".post-thumb").find("img").attr("src");
if (title && link && image) {
catalog.push({
title: title.replace("Download", "").trim(),
link: link,
image: image,
});
}
});
return catalog;
}
catch (err) {
return [];
}
}

186
dist/world4u/stream.js vendored
View File

@@ -1,186 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = void 0;
const getStream = async function ({ link: url, type, providerContext, }) {
const { axios, cheerio } = providerContext;
const headers = {
"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-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/120.0.0.0 Safari/537.36 Edg/120.0.0.0",
};
try {
if (type === "movie") {
const linkRes = await axios.get(url, { headers });
const linkData = linkRes.data;
const $ = cheerio.load(linkData);
url = $('strong:contains("INSTANT")').parent().attr("href") || url;
}
// fastilinks
if (url.includes("fastilinks")) {
const fastilinksRes = await axios.get(url, { headers });
const fastilinksData = fastilinksRes.data;
const $$ = cheerio.load(fastilinksData);
const fastilinksKey = $$('input[name="_csrf_token_645a83a41868941e4692aa31e7235f2"]').attr("value");
console.log("fastilinksKey", fastilinksKey);
const fastilinksFormData = new FormData();
fastilinksFormData.append("_csrf_token_645a83a41868941e4692aa31e7235f2", fastilinksKey || "");
const fastilinksRes2 = await fetch(url, {
method: "POST",
headers: headers,
body: fastilinksFormData,
});
const fastilinksHtml = await fastilinksRes2.text();
// console.log('fastilinksHtml', fastilinksHtml);
const $$$ = cheerio.load(fastilinksHtml);
const fastilinksLink = $$$('a:contains("mediafire")').attr("href") ||
$$$('a:contains("photolinx")').attr("href");
console.log("fastilinksLink", fastilinksLink);
url = fastilinksLink || url;
}
console.log("world4uGetStream", type, url);
if (url.includes("photolinx")) {
console.log("photolinx", url);
// const photolinxBaseUrl = url.split('/').slice(0, 3).join('/');
const photolinxRes = await axios.get(url, { headers });
const photolinxData = photolinxRes.data;
const $$$ = cheerio.load(photolinxData);
const access_token = $$$("#generate_url").attr("data-token");
const uid = $$$("#generate_url").attr("data-uid");
const body = {
type: "DOWNLOAD_GENERATE",
payload: {
access_token,
uid,
},
};
console.log("photolinxData", JSON.stringify(body));
const photolinxRes2 = await fetch("https://photolinx.shop/action", {
headers: {
"sec-fetch-site": "same-origin",
"x-requested-with": "xmlhttprequest",
cookie: "PHPSESSID=9a8d855c700cf0711831c04960c2e2b4",
Referer: "https://photolinx.shop/download/5mPkrBD0D2x",
"Referrer-Policy": "strict-origin-when-cross-origin",
},
body: JSON.stringify(body),
method: "POST",
});
const photolinxData2 = await photolinxRes2.json();
console.log("photolinxData2", photolinxData2);
const dwUrl = photolinxData2?.download_url;
if (dwUrl) {
const streamLinks = [
{
server: "Photolinx",
link: dwUrl,
type: "mkv",
},
];
return streamLinks;
}
}
const res = await axios.get(url, { headers });
const html = res.data;
const streamLinks = [];
let data = { download: "" };
try {
const key = html.match(/formData\.append\('key',\s*'(\d+)'\);/)?.[1] || "";
console.log("key", key);
const formData = new FormData();
formData.append("key", key);
const streamRes = await fetch(url, {
method: "POST",
headers: headers,
body: formData,
});
data = await streamRes.json();
}
catch (err) {
console.log("error in world4uGetStream", err);
}
// console.log('streamRes', streamRes);
let $ = cheerio.load(html);
// console.log('data', html);
const mediafireUrl = $('h1:contains("Download")').find("a").attr("href") ||
$(".input.popsok").attr("href");
console.log("mediafireUrl", mediafireUrl);
if (mediafireUrl) {
const directUrl = await axios.head(mediafireUrl);
const urlContentType = directUrl.headers["content-type"];
console.log("mfcontentType", urlContentType);
if (urlContentType && urlContentType.includes("video")) {
streamLinks.push({
server: "Mediafire",
link: mediafireUrl,
type: "mkv",
});
return streamLinks;
}
else {
const repairRes = await axios.get(mediafireUrl, {
headers: {
Referer: url,
},
});
const repairHtml = repairRes.data;
// Regex to match the window.location.href assignment in the script content
const hrefRegex = /window\.location\.href\s*=\s*['"]([^'"]+)['"]/;
const match = repairHtml.match(hrefRegex);
// If a match is found, return the URL; otherwise return null
let downloadLInk = match ? match[1] : null;
console.log("downloadLInk", downloadLInk);
if (downloadLInk) {
streamLinks.push({
server: "Mediafire",
link: downloadLInk,
type: "mkv",
});
}
return streamLinks;
}
}
const requireRepairRes = await axios.head(data.download);
const contentType = requireRepairRes.headers["content-type"];
console.log("contentType", contentType);
if (contentType && contentType.includes("video")) {
streamLinks.push({
server: "Mediafire",
link: data.download,
type: "mkv",
});
return streamLinks;
}
else {
const repairRes = await axios.get(data.download, {
headers: {
Referer: url,
},
});
const repairHtml = repairRes.data;
const $ = cheerio.load(repairHtml);
const repairLink = $("#continue-btn").attr("href");
console.log("repairLink", "https://www.mediafire.com" + repairLink);
const repairRequireRepairRes = await axios.get("https://www.mediafire.com" + repairLink);
const $$ = cheerio.load(repairRequireRepairRes.data);
const repairDownloadLink = $$(".input.popsok").attr("href");
console.log("repairDownloadLink", repairDownloadLink);
if (repairDownloadLink) {
streamLinks.push({
server: "Mediafire",
link: repairDownloadLink,
type: "mkv",
});
}
}
return streamLinks;
}
catch (err) {
console.log(err);
return [];
}
};
exports.getStream = getStream;

View File

@@ -1,37 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.world4uGetEpisodeLinks = void 0;
const world4uGetEpisodeLinks = async function ({ url, providerContext, }) {
const { axios, cheerio } = providerContext;
try {
const res = await axios.get(url);
const html = res.data;
let $ = cheerio.load(html);
const episodeLinks = [];
$('strong:contains("Episode"),strong:contains("1080"),strong:contains("720"),strong:contains("480")').map((i, element) => {
const title = $(element).text();
const link = $(element)
.parent()
.parent()
.next('h4')
.find('a')
.attr('href');
if (link && !title.includes('zip')) {
episodeLinks.push({
title: title,
link,
});
}
});
return episodeLinks;
}
catch (err) {
return [
{
title: 'Server 1',
link: url,
},
];
}
};
exports.world4uGetEpisodeLinks = world4uGetEpisodeLinks;

View File

@@ -1,76 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.world4uGetInfo = void 0;
const world4uGetInfo = async function ({ link, providerContext, }) {
try {
const { axios, cheerio } = providerContext;
const url = link;
const res = await axios.get(url);
const data = res.data;
const $ = cheerio.load(data);
const type = $('.entry-content')
.text()
.toLocaleLowerCase()
.includes('movie name')
? 'movie'
: 'series';
const imdbId = $('.imdb_left').find('a').attr('href')?.split('/')[4] || '';
const title = $('.entry-content')
.find('strong:contains("Name")')
.children()
.remove()
.end()
.text()
.replace(':', '');
const synopsis = $('.entry-content')
.find('p:contains("Synopsis"),p:contains("Plot"),p:contains("Story")')
.children()
.remove()
.end()
.text();
const image = $('.wp-caption').find('img').attr('data-src') ||
$('.entry-content').find('img').attr('data-src') ||
'';
const links = [];
$('.my-button').map((i, element) => {
const title = $(element).parent().parent().prev().text();
const episodesLink = $(element).attr('href');
const quality = title.match(/\b(480p|720p|1080p|2160p)\b/i)?.[0] || '';
if (episodesLink && title) {
links.push({
title,
episodesLink: type === 'series' ? episodesLink : '',
directLinks: type === 'movie'
? [
{
link: episodesLink,
title,
type: 'movie',
},
]
: [],
quality,
});
}
});
return {
title,
synopsis,
image,
imdbId,
type,
linkList: links,
};
}
catch (err) {
return {
title: '',
synopsis: '',
image: '',
imdbId: '',
type: 'movie',
linkList: [],
};
}
};
exports.world4uGetInfo = world4uGetInfo;

View File

@@ -1,48 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.world4uGetPostsSearch = exports.world4uGetPosts = void 0;
const world4uGetPosts = async function ({ filter, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl('w4u');
const url = `${baseUrl + filter}/page/${page}/`;
return posts({ url, signal, axios, cheerio });
};
exports.world4uGetPosts = world4uGetPosts;
const world4uGetPostsSearch = async function ({ searchQuery, page,
// providerValue,
signal, providerContext, }) {
const { getBaseUrl, axios, cheerio } = providerContext;
const baseUrl = await getBaseUrl('w4u');
const url = `${baseUrl}/page/${page}/?s=${searchQuery}`;
return posts({ url, signal, axios, cheerio });
};
exports.world4uGetPostsSearch = world4uGetPostsSearch;
async function posts({ url, signal, axios, cheerio, }) {
try {
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data);
const catalog = [];
$('.recent-posts')
.children()
.map((i, element) => {
const title = $(element).find('.post-thumb').find('a').attr('title');
const link = $(element).find('.post-thumb').find('a').attr('href');
const image = $(element).find('.post-thumb').find('img').attr('data-src') ||
$(element).find('.post-thumb').find('img').attr('src');
if (title && link && image) {
catalog.push({
title: title.replace('Download', '').trim(),
link: link,
image: image,
});
}
});
return catalog;
}
catch (err) {
return [];
}
}

View File

@@ -1,186 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.world4uGetStream = void 0;
const world4uGetStream = async function ({ link: url, type, providerContext, }) {
const { axios, cheerio } = providerContext;
const headers = {
'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-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/120.0.0.0 Safari/537.36 Edg/120.0.0.0',
};
try {
if (type === 'movie') {
const linkRes = await axios.get(url, { headers });
const linkData = linkRes.data;
const $ = cheerio.load(linkData);
url = $('strong:contains("INSTANT")').parent().attr('href') || url;
}
// fastilinks
if (url.includes('fastilinks')) {
const fastilinksRes = await axios.get(url, { headers });
const fastilinksData = fastilinksRes.data;
const $$ = cheerio.load(fastilinksData);
const fastilinksKey = $$('input[name="_csrf_token_645a83a41868941e4692aa31e7235f2"]').attr('value');
console.log('fastilinksKey', fastilinksKey);
const fastilinksFormData = new FormData();
fastilinksFormData.append('_csrf_token_645a83a41868941e4692aa31e7235f2', fastilinksKey);
const fastilinksRes2 = await fetch(url, {
method: 'POST',
headers: headers,
body: fastilinksFormData,
});
const fastilinksHtml = await fastilinksRes2.text();
// console.log('fastilinksHtml', fastilinksHtml);
const $$$ = cheerio.load(fastilinksHtml);
const fastilinksLink = $$$('a:contains("mediafire")').attr('href') ||
$$$('a:contains("photolinx")').attr('href');
console.log('fastilinksLink', fastilinksLink);
url = fastilinksLink || url;
}
console.log('world4uGetStream', type, url);
if (url.includes('photolinx')) {
console.log('photolinx', url);
// const photolinxBaseUrl = url.split('/').slice(0, 3).join('/');
const photolinxRes = await axios.get(url, { headers });
const photolinxData = photolinxRes.data;
const $$$ = cheerio.load(photolinxData);
const access_token = $$$('#generate_url').attr('data-token');
const uid = $$$('#generate_url').attr('data-uid');
const body = {
type: 'DOWNLOAD_GENERATE',
payload: {
access_token,
uid,
},
};
console.log('photolinxData', JSON.stringify(body));
const photolinxRes2 = await fetch('https://photolinx.shop/action', {
headers: {
'sec-fetch-site': 'same-origin',
'x-requested-with': 'xmlhttprequest',
cookie: 'PHPSESSID=9a8d855c700cf0711831c04960c2e2b4',
Referer: 'https://photolinx.shop/download/5mPkrBD0D2x',
'Referrer-Policy': 'strict-origin-when-cross-origin',
},
body: JSON.stringify(body),
method: 'POST',
});
const photolinxData2 = await photolinxRes2.json();
console.log('photolinxData2', photolinxData2);
const dwUrl = photolinxData2?.download_url;
if (dwUrl) {
const streamLinks = [
{
server: 'Photolinx',
link: dwUrl,
type: 'mkv',
},
];
return streamLinks;
}
}
const res = await axios.get(url, { headers });
const html = res.data;
const streamLinks = [];
let data = { download: '' };
try {
const key = html.match(/formData\.append\('key',\s*'(\d+)'\);/)?.[1] || '';
console.log('key', key);
const formData = new FormData();
formData.append('key', key);
const streamRes = await fetch(url, {
method: 'POST',
headers: headers,
body: formData,
});
data = await streamRes.json();
}
catch (err) {
console.log('error in world4uGetStream', err);
}
// console.log('streamRes', streamRes);
let $ = cheerio.load(html);
// console.log('data', html);
const mediafireUrl = $('h1:contains("Download")').find('a').attr('href') ||
$('.input.popsok').attr('href');
console.log('mediafireUrl', mediafireUrl);
if (mediafireUrl) {
const directUrl = await axios.head(mediafireUrl);
const urlContentType = directUrl.headers['content-type'];
console.log('mfcontentType', urlContentType);
if (urlContentType && urlContentType.includes('video')) {
streamLinks.push({
server: 'Mediafire',
link: mediafireUrl,
type: 'mkv',
});
return streamLinks;
}
else {
const repairRes = await axios.get(mediafireUrl, {
headers: {
Referer: url,
},
});
const repairHtml = repairRes.data;
// Regex to match the window.location.href assignment in the script content
const hrefRegex = /window\.location\.href\s*=\s*['"]([^'"]+)['"]/;
const match = repairHtml.match(hrefRegex);
// If a match is found, return the URL; otherwise return null
let downloadLInk = match ? match[1] : null;
console.log('downloadLInk', downloadLInk);
if (downloadLInk) {
streamLinks.push({
server: 'Mediafire',
link: downloadLInk,
type: 'mkv',
});
}
return streamLinks;
}
}
const requireRepairRes = await axios.head(data.download);
const contentType = requireRepairRes.headers['content-type'];
console.log('contentType', contentType);
if (contentType && contentType.includes('video')) {
streamLinks.push({
server: 'Mediafire',
link: data.download,
type: 'mkv',
});
return streamLinks;
}
else {
const repairRes = await axios.get(data.download, {
headers: {
Referer: url,
},
});
const repairHtml = repairRes.data;
const $ = cheerio.load(repairHtml);
const repairLink = $('#continue-btn').attr('href');
console.log('repairLink', 'https://www.mediafire.com' + repairLink);
const repairRequireRepairRes = await axios.get('https://www.mediafire.com' + repairLink);
const $$ = cheerio.load(repairRequireRepairRes.data);
const repairDownloadLink = $$('.input.popsok').attr('href');
console.log('repairDownloadLink', repairDownloadLink);
if (repairDownloadLink) {
streamLinks.push({
server: 'Mediafire',
link: repairDownloadLink,
type: 'mkv',
});
}
}
return streamLinks;
}
catch (err) {
console.log(err);
return [];
}
};
exports.world4uGetStream = world4uGetStream;