mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
Add new providers for kmMovies, movies4u,katmoviefix, and zeefliz
Co-authored-by: DHR-Store <boss@dhrgroup.ai>
This commit is contained in:
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