mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 15:41:45 +00:00
Revert "feat: add extractors bundled in file refactor stream handling in multiple providers"
This reverts commit 13d41f9da6.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -33,15 +32,10 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const hubcloudLink = await hubcloudExtractor(
|
||||
link,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
commonHeaders,
|
||||
);
|
||||
const hubcloudLink = await hubcloudExtracter(link, signal);
|
||||
|
||||
return hubcloudLink;
|
||||
} catch (error: any) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
export async function getStream({
|
||||
link,
|
||||
@@ -11,7 +10,13 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const {
|
||||
axios,
|
||||
cheerio,
|
||||
extractors,
|
||||
commonHeaders: headers,
|
||||
} = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
let hubdriveLink = "";
|
||||
if (link.includes("hubdrive")) {
|
||||
const hubdriveRes = await axios.get(link, { headers, signal });
|
||||
@@ -28,13 +33,7 @@ export async function getStream({
|
||||
const redirectLink = await getRedirectLinks(link, signal, headers);
|
||||
console.log("redirectLink", redirectLink);
|
||||
if (redirectLink.includes("hubcloud") || redirectLink.includes("/drive/")) {
|
||||
return await hubcloudExtractor(
|
||||
redirectLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
);
|
||||
return await hubcloudExtracter(redirectLink, signal);
|
||||
}
|
||||
const redirectLinkRes = await axios.get(redirectLink, { headers, signal });
|
||||
const redirectLinkText = redirectLinkRes.data;
|
||||
@@ -60,13 +59,7 @@ export async function getStream({
|
||||
/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i,
|
||||
)?.[1] || hubdriveLink;
|
||||
try {
|
||||
return await hubcloudExtractor(
|
||||
hubcloudLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
);
|
||||
return await hubcloudExtracter(hubcloudLink, signal);
|
||||
} catch (error: any) {
|
||||
console.log("hd hub 4 getStream error: ", error);
|
||||
return [];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
accept:
|
||||
@@ -30,7 +29,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
@@ -47,7 +47,7 @@ export async function getStream({
|
||||
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;"]',
|
||||
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||
)
|
||||
.parent()
|
||||
.attr("href");
|
||||
@@ -71,7 +71,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if (filepressTokenRes.data?.status) {
|
||||
@@ -88,7 +88,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
@@ -103,7 +103,7 @@ export async function getStream({
|
||||
}
|
||||
}
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Stream, ProviderContext } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
import { gdflixExtractor } from "../extractors/gdflix";
|
||||
|
||||
export const getStream = async ({
|
||||
link,
|
||||
@@ -12,7 +10,6 @@ export const getStream = async ({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> => {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
try {
|
||||
let newLink = link;
|
||||
console.log("getStream 1", link);
|
||||
@@ -42,7 +39,7 @@ export const getStream = async ({
|
||||
});
|
||||
const html = await res.text();
|
||||
const refreshMetaMatch = html.match(
|
||||
/<meta\s+http-equiv="refresh"\s+content="[^"]*url=([^"]+)"/i,
|
||||
/<meta\s+http-equiv="refresh"\s+content="[^"]*url=([^"]+)"/i
|
||||
);
|
||||
if (refreshMetaMatch && refreshMetaMatch[1]) {
|
||||
link = refreshMetaMatch[1];
|
||||
@@ -53,8 +50,8 @@ export const getStream = async ({
|
||||
console.log("getStream 2", link);
|
||||
|
||||
if (link.includes("luxedrive")) {
|
||||
const res = await axios.get(link, { signal });
|
||||
const $ = cheerio.load(res.data);
|
||||
const res = await providerContext.axios.get(link, { signal });
|
||||
const $ = providerContext.cheerio.load(res.data);
|
||||
const hubcloudLink = $("a.btn.hubcloud").attr("href");
|
||||
if (hubcloudLink) {
|
||||
newLink = hubcloudLink;
|
||||
@@ -66,24 +63,18 @@ export const getStream = async ({
|
||||
}
|
||||
}
|
||||
if (newLink.includes("flix")) {
|
||||
const sreams = await gdflixExtractor(
|
||||
const sreams = await providerContext.extractors.gdFlixExtracter(
|
||||
newLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
signal
|
||||
);
|
||||
return sreams;
|
||||
}
|
||||
const res2 = await axios.get(newLink, { signal });
|
||||
const res2 = await providerContext.axios.get(newLink, { signal });
|
||||
const data2 = res2.data;
|
||||
const hcLink = data2.match(/location\.replace\('([^']+)'/)?.[1] || newLink;
|
||||
const hubCloudLinks = await hubcloudExtractor(
|
||||
const hubCloudLinks = await providerContext.extractors.hubcloudExtracter(
|
||||
hcLink.includes("https://hubcloud") ? hcLink : newLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
signal
|
||||
);
|
||||
return hubCloudLinks;
|
||||
} catch (err) {
|
||||
|
||||
@@ -14,8 +14,6 @@ export const getEpisodes = async function ({
|
||||
let $ = cheerio.load(html);
|
||||
|
||||
const episodeLinks: EpisodeLink[] = [];
|
||||
|
||||
// Try old format first (backward compatibility)
|
||||
$('a:contains("HubCloud")').map((i, element) => {
|
||||
const title = $(element).parent().prev().text();
|
||||
const link = $(element).attr("href");
|
||||
@@ -27,58 +25,8 @@ export const getEpisodes = async function ({
|
||||
}
|
||||
});
|
||||
|
||||
// If old format didn't work, try new format
|
||||
if (episodeLinks.length === 0) {
|
||||
// Find all anchor tags with href containing streaming services
|
||||
const streamingServices = ["hubcloud", "gdflix"];
|
||||
let currentTitle = "";
|
||||
|
||||
$('h5 span[style*="color"], h5').each((i, element) => {
|
||||
const text = $(element).text().trim();
|
||||
// Look for titles that contain quality indicators or episode info
|
||||
if (
|
||||
text &&
|
||||
(text.match(/\d{3,4}p/) ||
|
||||
text.includes("Ep") ||
|
||||
text.includes("Episode"))
|
||||
) {
|
||||
currentTitle = text;
|
||||
|
||||
// Find the next links after this title
|
||||
let nextElement = $(element).parent();
|
||||
for (let j = 0; j < 10; j++) {
|
||||
nextElement = nextElement.next();
|
||||
if (!nextElement.length) break;
|
||||
|
||||
const links = nextElement.find("a[href]");
|
||||
links.each((k, linkEl) => {
|
||||
const href = $(linkEl).attr("href");
|
||||
if (
|
||||
href &&
|
||||
streamingServices.some((service) => href.includes(service))
|
||||
) {
|
||||
// Determine server name from URL
|
||||
let serverName = "Play";
|
||||
if (href.includes("hubcloud")) serverName = "HubCloud";
|
||||
else if (href.includes("gdflix")) serverName = "GDFlix";
|
||||
else if (href.includes("pixeldrain")) serverName = "Pixeldrain";
|
||||
else if (href.includes("fastdl")) serverName = "FastDL";
|
||||
|
||||
const title = currentTitle
|
||||
? `${currentTitle} - ${serverName}`
|
||||
: serverName;
|
||||
episodeLinks.push({ title, link: href });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// console.log(episodeLinks);
|
||||
return episodeLinks.length > 0
|
||||
? episodeLinks
|
||||
: [{ title: "Play", link: url }];
|
||||
return episodeLinks;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return [
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Stream, ProviderContext } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
import { gdflixExtractor } from "../extractors/gdflix";
|
||||
|
||||
export const getStream = async function ({
|
||||
link: url,
|
||||
@@ -13,61 +11,37 @@ export const getStream = async function ({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const headers = providerContext.commonHeaders;
|
||||
try {
|
||||
if (type === "movie") {
|
||||
const res = await axios.get(url, { headers });
|
||||
const res = await providerContext.axios.get(url, { headers });
|
||||
const html = res.data;
|
||||
const $ = cheerio.load(html);
|
||||
const $ = providerContext.cheerio.load(html);
|
||||
const link = $('a:contains("HubCloud")').attr("href");
|
||||
url = link || url;
|
||||
}
|
||||
|
||||
let redirectUrl = "";
|
||||
try {
|
||||
const res = await axios.get(url, { headers });
|
||||
const res = await providerContext.axios.get(url, { headers });
|
||||
let redirectUrl = res.data.match(
|
||||
/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i
|
||||
)?.[1];
|
||||
if (url.includes("/archives/")) {
|
||||
redirectUrl = res.data.match(
|
||||
/<meta\s+http-equiv="refresh"\s+content="[^"]*?;\s*url=([^"]+)"\s*\/?>/i,
|
||||
/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i
|
||||
)?.[1];
|
||||
if (url.includes("/archives/")) {
|
||||
redirectUrl = res.data.match(
|
||||
/<a\s+[^>]*href="(https:\/\/hubcloud\.[^\/]+\/[^"]+)"/i,
|
||||
)?.[1];
|
||||
}
|
||||
} catch (err: any) {
|
||||
console.error("Hubcloud redirect err", err?.message || err);
|
||||
}
|
||||
if (!redirectUrl) {
|
||||
if (url.includes("hubcloud")) {
|
||||
console.log(" hubcloud link found in:", url);
|
||||
return await hubcloudExtractor(url, signal, axios, cheerio, headers);
|
||||
} else if (url.includes("gdflix")) {
|
||||
// handle gdflix links
|
||||
console.log("gdflix link found:", url);
|
||||
const gdflixStreams = await gdflixExtractor(
|
||||
url,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
);
|
||||
return gdflixStreams;
|
||||
}
|
||||
return await providerContext.extractors.hubcloudExtracter(url, signal);
|
||||
}
|
||||
console.log("redirectUrl", redirectUrl);
|
||||
const res2 = await axios.get(redirectUrl, { headers });
|
||||
const res2 = await providerContext.axios.get(redirectUrl, { headers });
|
||||
const data = res2.data;
|
||||
const $ = cheerio.load(data);
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const hubcloudLink = $(".fa-file-download").parent().attr("href");
|
||||
return await hubcloudExtractor(
|
||||
return await providerContext.extractors.hubcloudExtracter(
|
||||
hubcloudLink?.includes("https://hubcloud") ? hubcloudLink : redirectUrl,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
signal
|
||||
);
|
||||
} catch (err: any) {
|
||||
console.error("Movies Drive err", err?.message || err);
|
||||
} catch (err) {
|
||||
console.error("Movies Drive err", err);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
export async function gofileExtractor(
|
||||
id: string,
|
||||
axios: any,
|
||||
): Promise<{ link: string; token: string }> {
|
||||
try {
|
||||
const gofileRes = await axios.get("https://gofile.io/d/" + id);
|
||||
const genAccountres = await axios.post("https://api.gofile.io/accounts");
|
||||
const token = genAccountres.data.data.token;
|
||||
console.log("gofile token", token);
|
||||
|
||||
const wtRes = await axios.get("https://gofile.io/dist/js/global.js");
|
||||
const wt = wtRes.data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1];
|
||||
console.log("gofile wt", wt);
|
||||
|
||||
const res = await axios.get(
|
||||
`https://api.gofile.io/contents/${id}?wt=${wt}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
},
|
||||
);
|
||||
const oId = Object.keys(res.data.data.children)[0];
|
||||
console.log("gofileExtractor", res.data.data.children[oId].link);
|
||||
const link = res.data.data.children[oId].link;
|
||||
return {
|
||||
link,
|
||||
token,
|
||||
};
|
||||
} catch (e) {
|
||||
console.log("gofileExtractor error", e);
|
||||
return {
|
||||
link: "",
|
||||
token: "",
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Stream, ProviderContext } from "../types";
|
||||
import { gdflixExtractor } from "../extractors/gdflix";
|
||||
|
||||
export const getStream = async function ({
|
||||
link,
|
||||
@@ -11,23 +10,19 @@ export const getStream = async function ({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
try {
|
||||
const res = await axios.get(link, { signal });
|
||||
const res = await providerContext.axios.get(link, { signal });
|
||||
const data = res.data;
|
||||
const $ = cheerio.load(data);
|
||||
const $ = providerContext.cheerio.load(data);
|
||||
const streams: Stream[] = [];
|
||||
const elements = $(".button2,.button1,.button3,.button4,.button").toArray();
|
||||
const promises = elements.map(async (element) => {
|
||||
const title = $(element).text();
|
||||
let link = $(element).attr("href");
|
||||
if (title.includes("GDFLIX") && link) {
|
||||
const gdLinks = await gdflixExtractor(
|
||||
const gdLinks = await providerContext.extractors.gdFlixExtracter(
|
||||
link,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
signal
|
||||
);
|
||||
streams.push(...gdLinks);
|
||||
}
|
||||
|
||||
@@ -1,174 +1,173 @@
|
||||
export async function gdflixExtractor(
|
||||
link: string,
|
||||
signal: AbortSignal,
|
||||
axios: any,
|
||||
cheerio: any,
|
||||
headers: Record<string, string>,
|
||||
) {
|
||||
try {
|
||||
const streamLinks: any[] = [];
|
||||
const res = await axios(`${link}`, { headers, signal });
|
||||
console.log("gdflixExtractor", link);
|
||||
const data = res.data;
|
||||
let $drive = cheerio.load(data);
|
||||
// handle if redirected to another link
|
||||
|
||||
if ($drive("body").attr("onload")?.includes("location.replace")) {
|
||||
const newLink = $drive("body")
|
||||
.attr("onload")
|
||||
?.split("location.replace('")?.[1]
|
||||
.split("'")?.[0];
|
||||
|
||||
console.log("newLink", newLink);
|
||||
if (newLink) {
|
||||
const newRes = await axios.get(newLink, { headers, signal });
|
||||
$drive = cheerio.load(newRes.data);
|
||||
}
|
||||
}
|
||||
|
||||
// try {
|
||||
// const resumeBot = $drive('.fab.fa-artstation').prev().attr('href') || '';
|
||||
// console.log('resumeBot', resumeBot);
|
||||
// const resumeBotRes = await axios.get(resumeBot, {headers});
|
||||
// const resumeBotToken = resumeBotRes.data.match(
|
||||
// /formData\.append\('token', '([a-f0-9]+)'\)/,
|
||||
// )[1];
|
||||
// const resumeBotBody = new FormData();
|
||||
// resumeBotBody.append('token', resumeBotToken);
|
||||
// const resumeBotPath = resumeBotRes.data.match(
|
||||
// /fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/,
|
||||
// )[1];
|
||||
// const resumeBotBaseUrl = resumeBot.split('/download')[0];
|
||||
// // console.log(
|
||||
// // 'resumeBotPath',
|
||||
// // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// // );
|
||||
// // console.log('resumeBotBody', resumeBotToken);
|
||||
|
||||
// const resumeBotDownload = await fetch(
|
||||
// resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// {
|
||||
// method: 'POST',
|
||||
// body: resumeBotBody,
|
||||
// headers: {
|
||||
// Referer: resumeBot,
|
||||
// Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
|
||||
// },
|
||||
// },
|
||||
// );
|
||||
// const resumeBotDownloadData = await resumeBotDownload.json();
|
||||
// console.log('resumeBotDownloadData', resumeBotDownloadData.url);
|
||||
// streamLinks.push({
|
||||
// server: 'ResumeBot',
|
||||
// link: resumeBotDownloadData.url,
|
||||
// type: 'mkv',
|
||||
// });
|
||||
// } catch (err) {
|
||||
// console.log('ResumeBot link not found', err);
|
||||
// }
|
||||
|
||||
/// resume cloud
|
||||
try {
|
||||
const baseUrl = link.split("/").slice(0, 3).join("/");
|
||||
const resumeDrive = $drive(".btn-secondary").attr("href") || "";
|
||||
console.log("resumeDrive", resumeDrive);
|
||||
if (resumeDrive.includes("indexbot")) {
|
||||
const resumeBotRes = await axios.get(resumeDrive, { headers });
|
||||
const resumeBotToken = resumeBotRes.data.match(
|
||||
/formData\.append\('token', '([a-f0-9]+)'\)/,
|
||||
)[1];
|
||||
const resumeBotBody = new FormData();
|
||||
resumeBotBody.append("token", resumeBotToken);
|
||||
const resumeBotPath = resumeBotRes.data.match(
|
||||
/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/,
|
||||
)[1];
|
||||
const resumeBotBaseUrl = resumeDrive.split("/download")[0];
|
||||
// console.log(
|
||||
// 'resumeBotPath',
|
||||
// resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// );
|
||||
// console.log('resumeBotBody', resumeBotToken);
|
||||
|
||||
const resumeBotDownload = await fetch(
|
||||
resumeBotBaseUrl + "/download?id=" + resumeBotPath,
|
||||
{
|
||||
method: "POST",
|
||||
body: resumeBotBody,
|
||||
headers: {
|
||||
Referer: resumeDrive,
|
||||
Cookie: "PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308",
|
||||
},
|
||||
},
|
||||
);
|
||||
const resumeBotDownloadData = await resumeBotDownload.json();
|
||||
console.log("resumeBotDownloadData", resumeBotDownloadData.url);
|
||||
streamLinks.push({
|
||||
server: "ResumeBot",
|
||||
link: resumeBotDownloadData.url,
|
||||
type: "mkv",
|
||||
});
|
||||
} else {
|
||||
const url = baseUrl + resumeDrive;
|
||||
const resumeDriveRes = await axios.get(url, { headers });
|
||||
const resumeDriveHtml = resumeDriveRes.data;
|
||||
const $resumeDrive = cheerio.load(resumeDriveHtml);
|
||||
const resumeLink = $resumeDrive(".btn-success").attr("href");
|
||||
// console.log('resumeLink', resumeLink);
|
||||
if (resumeLink) {
|
||||
streamLinks.push({
|
||||
server: "ResumeCloud",
|
||||
link: resumeLink,
|
||||
type: "mkv",
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log("Resume link not found");
|
||||
}
|
||||
|
||||
//instant link
|
||||
try {
|
||||
const seed = $drive(".btn-danger").attr("href") || "";
|
||||
console.log("seed", seed);
|
||||
if (!seed.includes("?url=")) {
|
||||
const newLinkRes = await axios.head(seed, { headers, signal });
|
||||
console.log("newLinkRes", newLinkRes.request?.responseURL);
|
||||
const newLink =
|
||||
newLinkRes.request?.responseURL?.split("?url=")?.[1] || seed;
|
||||
streamLinks.push({ server: "G-Drive", link: newLink, type: "mkv" });
|
||||
} else {
|
||||
const instantToken = seed.split("=")[1];
|
||||
// console.log('InstantToken', instantToken);
|
||||
const InstantFromData = new FormData();
|
||||
InstantFromData.append("keys", instantToken);
|
||||
const videoSeedUrl = seed.split("/").slice(0, 3).join("/") + "/api";
|
||||
// console.log('videoSeedUrl', videoSeedUrl);
|
||||
const instantLinkRes = await fetch(videoSeedUrl, {
|
||||
method: "POST",
|
||||
body: InstantFromData,
|
||||
headers: {
|
||||
"x-token": videoSeedUrl,
|
||||
},
|
||||
});
|
||||
const instantLinkData = await instantLinkRes.json();
|
||||
// console.log('instantLinkData', instantLinkData);
|
||||
if (instantLinkData.error === false) {
|
||||
const instantLink = instantLinkData.url;
|
||||
streamLinks.push({
|
||||
server: "Gdrive-Instant",
|
||||
link: instantLink,
|
||||
type: "mkv",
|
||||
});
|
||||
} else {
|
||||
console.log("Instant link not found", instantLinkData);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log("Instant link not found", err);
|
||||
}
|
||||
return streamLinks;
|
||||
} catch (error) {
|
||||
console.log("gdflix error: ", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
import axios from 'axios';
|
||||
import * as cheerio from 'cheerio';
|
||||
import {Stream} from './types';
|
||||
import {headers} from './headers';
|
||||
|
||||
export async function gdFlixExtracter(link: string, signal: AbortSignal) {
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
const res = await axios(`${link}`, {headers, signal});
|
||||
console.log('gdFlixExtracter', link);
|
||||
const data = res.data;
|
||||
let $drive = cheerio.load(data);
|
||||
// handle if redirected to another link
|
||||
|
||||
if ($drive('body').attr('onload')?.includes('location.replace')) {
|
||||
const newLink = $drive('body')
|
||||
.attr('onload')
|
||||
?.split("location.replace('")?.[1]
|
||||
.split("'")?.[0];
|
||||
|
||||
console.log('newLink', newLink);
|
||||
if (newLink) {
|
||||
const newRes = await axios.get(newLink, {headers, signal});
|
||||
$drive = cheerio.load(newRes.data);
|
||||
}
|
||||
}
|
||||
|
||||
// try {
|
||||
// const resumeBot = $drive('.fab.fa-artstation').prev().attr('href') || '';
|
||||
// console.log('resumeBot', resumeBot);
|
||||
// const resumeBotRes = await axios.get(resumeBot, {headers});
|
||||
// const resumeBotToken = resumeBotRes.data.match(
|
||||
// /formData\.append\('token', '([a-f0-9]+)'\)/,
|
||||
// )[1];
|
||||
// const resumeBotBody = new FormData();
|
||||
// resumeBotBody.append('token', resumeBotToken);
|
||||
// const resumeBotPath = resumeBotRes.data.match(
|
||||
// /fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/,
|
||||
// )[1];
|
||||
// const resumeBotBaseUrl = resumeBot.split('/download')[0];
|
||||
// // console.log(
|
||||
// // 'resumeBotPath',
|
||||
// // resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// // );
|
||||
// // console.log('resumeBotBody', resumeBotToken);
|
||||
|
||||
// const resumeBotDownload = await fetch(
|
||||
// resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// {
|
||||
// method: 'POST',
|
||||
// body: resumeBotBody,
|
||||
// headers: {
|
||||
// Referer: resumeBot,
|
||||
// Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
|
||||
// },
|
||||
// },
|
||||
// );
|
||||
// const resumeBotDownloadData = await resumeBotDownload.json();
|
||||
// console.log('resumeBotDownloadData', resumeBotDownloadData.url);
|
||||
// streamLinks.push({
|
||||
// server: 'ResumeBot',
|
||||
// link: resumeBotDownloadData.url,
|
||||
// type: 'mkv',
|
||||
// });
|
||||
// } catch (err) {
|
||||
// console.log('ResumeBot link not found', err);
|
||||
// }
|
||||
|
||||
/// resume cloud
|
||||
try {
|
||||
const baseUrl = link.split('/').slice(0, 3).join('/');
|
||||
const resumeDrive = $drive('.btn-secondary').attr('href') || '';
|
||||
console.log('resumeDrive', resumeDrive);
|
||||
if (resumeDrive.includes('indexbot')) {
|
||||
const resumeBotRes = await axios.get(resumeDrive, {headers});
|
||||
const resumeBotToken = resumeBotRes.data.match(
|
||||
/formData\.append\('token', '([a-f0-9]+)'\)/,
|
||||
)[1];
|
||||
const resumeBotBody = new FormData();
|
||||
resumeBotBody.append('token', resumeBotToken);
|
||||
const resumeBotPath = resumeBotRes.data.match(
|
||||
/fetch\('\/download\?id=([a-zA-Z0-9\/+]+)'/,
|
||||
)[1];
|
||||
const resumeBotBaseUrl = resumeDrive.split('/download')[0];
|
||||
// console.log(
|
||||
// 'resumeBotPath',
|
||||
// resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
// );
|
||||
// console.log('resumeBotBody', resumeBotToken);
|
||||
|
||||
const resumeBotDownload = await fetch(
|
||||
resumeBotBaseUrl + '/download?id=' + resumeBotPath,
|
||||
{
|
||||
method: 'POST',
|
||||
body: resumeBotBody,
|
||||
headers: {
|
||||
Referer: resumeDrive,
|
||||
Cookie: 'PHPSESSID=7e9658ce7c805dab5bbcea9046f7f308',
|
||||
},
|
||||
},
|
||||
);
|
||||
const resumeBotDownloadData = await resumeBotDownload.json();
|
||||
console.log('resumeBotDownloadData', resumeBotDownloadData.url);
|
||||
streamLinks.push({
|
||||
server: 'ResumeBot',
|
||||
link: resumeBotDownloadData.url,
|
||||
type: 'mkv',
|
||||
});
|
||||
} else {
|
||||
const url = baseUrl + resumeDrive;
|
||||
const resumeDriveRes = await axios.get(url, {headers});
|
||||
const resumeDriveHtml = resumeDriveRes.data;
|
||||
const $resumeDrive = cheerio.load(resumeDriveHtml);
|
||||
const resumeLink = $resumeDrive('.btn-success').attr('href');
|
||||
// console.log('resumeLink', resumeLink);
|
||||
if (resumeLink) {
|
||||
streamLinks.push({
|
||||
server: 'ResumeCloud',
|
||||
link: resumeLink,
|
||||
type: 'mkv',
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Resume link not found');
|
||||
}
|
||||
|
||||
//instant link
|
||||
try {
|
||||
const seed = $drive('.btn-danger').attr('href') || '';
|
||||
console.log('seed', seed);
|
||||
if (!seed.includes('?url=')) {
|
||||
const newLinkRes = await axios.head(seed, {headers, signal});
|
||||
console.log('newLinkRes', newLinkRes.request?.responseURL);
|
||||
const newLink =
|
||||
newLinkRes.request?.responseURL?.split('?url=')?.[1] || seed;
|
||||
streamLinks.push({server: 'G-Drive', link: newLink, type: 'mkv'});
|
||||
} else {
|
||||
const instantToken = seed.split('=')[1];
|
||||
// console.log('InstantToken', instantToken);
|
||||
const InstantFromData = new FormData();
|
||||
InstantFromData.append('keys', instantToken);
|
||||
const videoSeedUrl = seed.split('/').slice(0, 3).join('/') + '/api';
|
||||
// console.log('videoSeedUrl', videoSeedUrl);
|
||||
const instantLinkRes = await fetch(videoSeedUrl, {
|
||||
method: 'POST',
|
||||
body: InstantFromData,
|
||||
headers: {
|
||||
'x-token': videoSeedUrl,
|
||||
},
|
||||
});
|
||||
const instantLinkData = await instantLinkRes.json();
|
||||
// console.log('instantLinkData', instantLinkData);
|
||||
if (instantLinkData.error === false) {
|
||||
const instantLink = instantLinkData.url;
|
||||
streamLinks.push({
|
||||
server: 'Gdrive-Instant',
|
||||
link: instantLink,
|
||||
type: 'mkv',
|
||||
});
|
||||
} else {
|
||||
console.log('Instant link not found', instantLinkData);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Instant link not found', err);
|
||||
}
|
||||
return streamLinks;
|
||||
} catch (error) {
|
||||
console.log('gdflix error: ', error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
38
providers/gofileExtracter.ts
Normal file
38
providers/gofileExtracter.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export async function gofileExtracter(
|
||||
id: string,
|
||||
): Promise<{link: string; token: string}> {
|
||||
try {
|
||||
const gofileRes = await axios.get('https://gofile.io/d/' + id);
|
||||
const genAccountres = await axios.post('https://api.gofile.io/accounts');
|
||||
const token = genAccountres.data.data.token;
|
||||
console.log('gofile token', token);
|
||||
|
||||
const wtRes = await axios.get('https://gofile.io/dist/js/global.js');
|
||||
const wt = wtRes.data.match(/appdata\.wt\s*=\s*["']([^"']+)["']/)[1];
|
||||
console.log('gofile wt', wt);
|
||||
|
||||
const res = await axios.get(
|
||||
`https://api.gofile.io/contents/${id}?wt=${wt}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
},
|
||||
);
|
||||
const oId = Object.keys(res.data.data.children)[0];
|
||||
console.log('gofile extracter', res.data.data.children[oId].link);
|
||||
const link = res.data.data.children[oId].link;
|
||||
return {
|
||||
link,
|
||||
token,
|
||||
};
|
||||
} catch (e) {
|
||||
console.log('gofile extracter err', e);
|
||||
return {
|
||||
link: '',
|
||||
token: '',
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { superVideoExtractor } from "../extractors/supeVideo";
|
||||
|
||||
export const getStream = async function ({
|
||||
link: id,
|
||||
@@ -11,7 +10,8 @@ export const getStream = async function ({
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> {
|
||||
try {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors, commonHeaders } = providerContext;
|
||||
const { superVideoExtractor } = extractors;
|
||||
async function ExtractGuardahd({
|
||||
imdb, // type, // season,
|
||||
}: // episode,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
export async function getStream({
|
||||
link,
|
||||
@@ -11,7 +10,13 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const {
|
||||
axios,
|
||||
cheerio,
|
||||
extractors,
|
||||
commonHeaders: headers,
|
||||
} = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
let hubdriveLink = "";
|
||||
if (link.includes("hubdrive")) {
|
||||
const hubdriveRes = await axios.get(link, { headers, signal });
|
||||
@@ -34,36 +39,23 @@ export async function getStream({
|
||||
redirectLinkText.match(
|
||||
/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/,
|
||||
)[1];
|
||||
console.log("hubdriveLink", hubdriveLink);
|
||||
if (hubdriveLink.includes("hubdrive")) {
|
||||
const hubdriveRes = await axios.get(hubdriveLink, { headers, signal });
|
||||
const hubdriveText = hubdriveRes.data;
|
||||
const $$ = cheerio.load(hubdriveText);
|
||||
hubdriveLink =
|
||||
$$(".btn.btn-primary.btn-user").attr("href") || hubdriveLink;
|
||||
$$(".btn.btn-primary.btn-user.btn-success1.m-1").attr("href") ||
|
||||
hubdriveLink;
|
||||
}
|
||||
console.log("hubdriveLink2", hubdriveLink);
|
||||
}
|
||||
let hubcloudLink = hubdriveLink;
|
||||
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal });
|
||||
const hubcloudText = hubdriveLinkRes.data;
|
||||
const hubcloudLink =
|
||||
hubcloudText.match(
|
||||
/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i,
|
||||
)?.[1] || hubdriveLink;
|
||||
try {
|
||||
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal });
|
||||
const hubcloudText = hubdriveLinkRes.data;
|
||||
hubcloudLink =
|
||||
hubcloudText.match(
|
||||
/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i,
|
||||
)?.[1] || hubdriveLink;
|
||||
} catch (error: any) {
|
||||
console.log("Error fetching hubdrive link:", error?.message);
|
||||
}
|
||||
console.log("hubcloudLink", hubcloudLink);
|
||||
try {
|
||||
return await hubcloudExtractor(
|
||||
hubcloudLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
headers,
|
||||
);
|
||||
return await hubcloudExtracter(hubcloudLink, signal);
|
||||
} catch (error: any) {
|
||||
console.log("hd hub 4 getStream error: ", error);
|
||||
return [];
|
||||
|
||||
@@ -1,151 +1,147 @@
|
||||
const hubcloudDecode = function (value: string) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return atob(value.toString());
|
||||
};
|
||||
|
||||
export async function hubcloudExtractor(
|
||||
link: string,
|
||||
signal: AbortSignal,
|
||||
axios: any,
|
||||
cheerio: any,
|
||||
headers: Record<string, string>,
|
||||
) {
|
||||
try {
|
||||
headers["Cookie"] =
|
||||
"ext_name=ojplmecpdpgccookcobabopnaifgidhf; xla=s4t; cf_clearance=woQrFGXtLfmEMBEiGUsVHrUBMT8s3cmguIzmMjmvpkg-1770053679-1.2.1.1-xBrQdciOJsweUF6F2T_OtH6jmyanN_TduQ0yslc_XqjU6RcHSxI7.YOKv6ry7oYo64868HYoULnVyww536H2eVI3R2e4wKzsky6abjPdfQPxqpUaXjxfJ02o6jl3_Vkwr4uiaU7Wy596Vdst3y78HXvVmKdIohhtPvp.vZ9_L7wvWdce0GRixjh_6JiqWmWMws46hwEt3hboaS1e1e4EoWCvj5b0M_jVwvSxBOAW5emFzvT3QrnRh4nyYmKDERnY";
|
||||
console.log("hubcloudExtractor", link);
|
||||
console.log("headers", headers);
|
||||
const baseUrl = link.split("/").slice(0, 3).join("/");
|
||||
const streamLinks: any[] = [];
|
||||
const vLinkRes = await axios(`${link}`, { headers, signal });
|
||||
const vLinkText = vLinkRes.data;
|
||||
const $vLink = cheerio.load(vLinkText);
|
||||
const vLinkRedirect = vLinkText.match(/var\s+url\s*=\s*'([^']+)';/) || [];
|
||||
let vcloudLink =
|
||||
hubcloudDecode(vLinkRedirect[1]?.split("r=")?.[1]) ||
|
||||
vLinkRedirect[1] ||
|
||||
$vLink(".fa-file-download.fa-lg").parent().attr("href") ||
|
||||
link;
|
||||
console.log("vcloudLink", vcloudLink);
|
||||
if (vcloudLink?.startsWith("/")) {
|
||||
vcloudLink = `${baseUrl}${vcloudLink}`;
|
||||
console.log("New vcloudLink", vcloudLink);
|
||||
}
|
||||
const vcloudRes = await fetch(vcloudLink, {
|
||||
headers,
|
||||
signal,
|
||||
redirect: "follow",
|
||||
});
|
||||
const $ = cheerio.load(await vcloudRes.text());
|
||||
// console.log('vcloudRes', $.text());
|
||||
|
||||
const linkClass = $(".btn-success.btn-lg.h6,.btn-danger,.btn-secondary");
|
||||
for (const element of linkClass) {
|
||||
const itm = $(element);
|
||||
let link = itm.attr("href") || "";
|
||||
|
||||
switch (true) {
|
||||
case link?.includes("pixeld"):
|
||||
if (!link?.includes("api")) {
|
||||
const token = link.split("/").pop();
|
||||
const baseUrl = link.split("/").slice(0, -2).join("/");
|
||||
link = `${baseUrl}/api/file/${token}?download`;
|
||||
}
|
||||
streamLinks.push({ server: "Pixeldrain", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes(".dev") && !link?.includes("/?id="):
|
||||
streamLinks.push({ server: "Cf Worker", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes("hubcloud") || link?.includes("/?id="):
|
||||
try {
|
||||
const newLinkRes = await fetch(link, {
|
||||
method: "HEAD",
|
||||
headers,
|
||||
signal,
|
||||
redirect: "manual",
|
||||
});
|
||||
|
||||
// Check if response is a redirect (301, 302, etc.)
|
||||
let newLink = link;
|
||||
if (newLinkRes.status >= 300 && newLinkRes.status < 400) {
|
||||
newLink = newLinkRes.headers.get("location") || link;
|
||||
} else if (newLinkRes.url && newLinkRes.url !== link) {
|
||||
// Fallback: check if URL changed (redirect was followed)
|
||||
newLink = newLinkRes.url;
|
||||
} else {
|
||||
newLink = newLinkRes.headers.get("location") || link;
|
||||
}
|
||||
if (newLink.includes("googleusercontent")) {
|
||||
newLink = newLink.split("?link=")[1];
|
||||
} else {
|
||||
const newLinkRes2 = await fetch(newLink, {
|
||||
method: "HEAD",
|
||||
headers,
|
||||
signal,
|
||||
redirect: "manual",
|
||||
});
|
||||
|
||||
// Check if response is a redirect
|
||||
if (newLinkRes2.status >= 300 && newLinkRes2.status < 400) {
|
||||
newLink =
|
||||
newLinkRes2.headers.get("location")?.split("?link=")[1] ||
|
||||
newLink;
|
||||
} else if (newLinkRes2.url && newLinkRes2.url !== newLink) {
|
||||
// Fallback: URL changed due to redirect
|
||||
newLink = newLinkRes2.url.split("?link=")[1] || newLinkRes2.url;
|
||||
} else {
|
||||
newLink =
|
||||
newLinkRes2.headers.get("location")?.split("?link=")[1] ||
|
||||
newLink;
|
||||
}
|
||||
}
|
||||
|
||||
streamLinks.push({
|
||||
server: "hubcloud",
|
||||
link: newLink,
|
||||
type: "mkv",
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("hubcloudExtractor error in hubcloud link: ", error);
|
||||
}
|
||||
break;
|
||||
|
||||
case link?.includes("cloudflarestorage"):
|
||||
streamLinks.push({ server: "CfStorage", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes("fastdl") || link?.includes("fsl."):
|
||||
streamLinks.push({ server: "FastDl", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link.includes("hubcdn") && !link.includes("/?id="):
|
||||
streamLinks.push({
|
||||
server: "HubCdn",
|
||||
link: link,
|
||||
type: "mkv",
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
if (link?.includes(".mkv") || link?.includes("?token=")) {
|
||||
const serverName =
|
||||
link
|
||||
.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/i)?.[1]
|
||||
?.replace(/\./g, " ") || "Unknown";
|
||||
streamLinks.push({ server: serverName, link: link, type: "mkv" });
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("streamLinks", streamLinks);
|
||||
return streamLinks;
|
||||
} catch (error: any) {
|
||||
console.log("hubcloudExtractor error: ", error?.message || error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
import axios from "axios";
|
||||
import * as cheerio from "cheerio";
|
||||
import { Stream } from "./types";
|
||||
import { headers } from "./headers";
|
||||
|
||||
const decode = function (value: string) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
return atob(value.toString());
|
||||
};
|
||||
|
||||
export async function hubcloudExtracter(link: string, signal: AbortSignal) {
|
||||
try {
|
||||
console.log("hubcloudExtracter", link);
|
||||
const baseUrl = link.split("/").slice(0, 3).join("/");
|
||||
const streamLinks: Stream[] = [];
|
||||
const vLinkRes = await axios(`${link}`, { headers, signal });
|
||||
const vLinkText = vLinkRes.data;
|
||||
const $vLink = cheerio.load(vLinkText);
|
||||
const vLinkRedirect = vLinkText.match(/var\s+url\s*=\s*'([^']+)';/) || [];
|
||||
let vcloudLink =
|
||||
decode(vLinkRedirect[1]?.split("r=")?.[1]) ||
|
||||
vLinkRedirect[1] ||
|
||||
$vLink(".fa-file-download.fa-lg").parent().attr("href") ||
|
||||
link;
|
||||
console.log("vcloudLink", vcloudLink);
|
||||
if (vcloudLink?.startsWith("/")) {
|
||||
vcloudLink = `${baseUrl}${vcloudLink}`;
|
||||
console.log("New vcloudLink", vcloudLink);
|
||||
}
|
||||
const vcloudRes = await fetch(vcloudLink, {
|
||||
headers,
|
||||
signal,
|
||||
redirect: "follow",
|
||||
});
|
||||
const $ = cheerio.load(await vcloudRes.text());
|
||||
// console.log('vcloudRes', $.text());
|
||||
|
||||
const linkClass = $(".btn-success.btn-lg.h6,.btn-danger,.btn-secondary");
|
||||
for (const element of linkClass) {
|
||||
const itm = $(element);
|
||||
let link = itm.attr("href") || "";
|
||||
|
||||
switch (true) {
|
||||
case link?.includes(".dev") && !link?.includes("/?id="):
|
||||
streamLinks.push({ server: "Cf Worker", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes("pixeld"):
|
||||
if (!link?.includes("api")) {
|
||||
const token = link.split("/").pop();
|
||||
const baseUrl = link.split("/").slice(0, -2).join("/");
|
||||
link = `${baseUrl}/api/file/${token}?download`;
|
||||
}
|
||||
streamLinks.push({ server: "Pixeldrain", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes("hubcloud") || link?.includes("/?id="):
|
||||
try {
|
||||
const newLinkRes = await fetch(link, {
|
||||
method: "HEAD",
|
||||
headers,
|
||||
signal,
|
||||
redirect: "manual",
|
||||
});
|
||||
|
||||
// Check if response is a redirect (301, 302, etc.)
|
||||
let newLink = link;
|
||||
if (newLinkRes.status >= 300 && newLinkRes.status < 400) {
|
||||
newLink = newLinkRes.headers.get("location") || link;
|
||||
} else if (newLinkRes.url && newLinkRes.url !== link) {
|
||||
// Fallback: check if URL changed (redirect was followed)
|
||||
newLink = newLinkRes.url;
|
||||
} else {
|
||||
newLink = newLinkRes.headers.get("location") || link;
|
||||
}
|
||||
if (newLink.includes("googleusercontent")) {
|
||||
newLink = newLink.split("?link=")[1];
|
||||
} else {
|
||||
const newLinkRes2 = await fetch(newLink, {
|
||||
method: "HEAD",
|
||||
headers,
|
||||
signal,
|
||||
redirect: "manual",
|
||||
});
|
||||
|
||||
// Check if response is a redirect
|
||||
if (newLinkRes2.status >= 300 && newLinkRes2.status < 400) {
|
||||
newLink =
|
||||
newLinkRes2.headers.get("location")?.split("?link=")[1] ||
|
||||
newLink;
|
||||
} else if (newLinkRes2.url && newLinkRes2.url !== newLink) {
|
||||
// Fallback: URL changed due to redirect
|
||||
newLink = newLinkRes2.url.split("?link=")[1] || newLinkRes2.url;
|
||||
} else {
|
||||
newLink =
|
||||
newLinkRes2.headers.get("location")?.split("?link=")[1] ||
|
||||
newLink;
|
||||
}
|
||||
}
|
||||
|
||||
streamLinks.push({
|
||||
server: "hubcloud",
|
||||
link: newLink,
|
||||
type: "mkv",
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("hubcloudExtracter error in hubcloud link: ", error);
|
||||
}
|
||||
break;
|
||||
|
||||
case link?.includes("cloudflarestorage"):
|
||||
streamLinks.push({ server: "CfStorage", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link?.includes("fastdl") || link?.includes("fsl."):
|
||||
streamLinks.push({ server: "FastDl", link: link, type: "mkv" });
|
||||
break;
|
||||
|
||||
case link.includes("hubcdn") && !link.includes("/?id="):
|
||||
streamLinks.push({
|
||||
server: "HubCdn",
|
||||
link: link,
|
||||
type: "mkv",
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
if (link?.includes(".mkv")) {
|
||||
const serverName =
|
||||
link
|
||||
.match(/^(?:https?:\/\/)?(?:www\.)?([^\/]+)/i)?.[1]
|
||||
?.replace(/\./g, " ") || "Unknown";
|
||||
streamLinks.push({ server: serverName, link: link, type: "mkv" });
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("streamLinks", streamLinks);
|
||||
return streamLinks;
|
||||
} catch (error) {
|
||||
console.log("hubcloudExtracter error: ", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -23,7 +22,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
@@ -43,13 +43,7 @@ export async function getStream({
|
||||
});
|
||||
|
||||
// --- hubcloud extraction ---
|
||||
const hubcloudStreams = await hubcloudExtractor(
|
||||
link,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
commonHeaders,
|
||||
);
|
||||
const hubcloudStreams = await hubcloudExtracter(link, signal);
|
||||
streamLinks.push(...hubcloudStreams);
|
||||
|
||||
return streamLinks;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { Stream, ProviderContext } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
import { gdflixExtractor } from "../extractors/gdflix";
|
||||
|
||||
async function extractKmhdLink(
|
||||
katlink: string,
|
||||
providerContext: ProviderContext,
|
||||
providerContext: ProviderContext
|
||||
) {
|
||||
const { axios } = providerContext;
|
||||
const res = await axios.get(katlink, {
|
||||
@@ -15,7 +13,7 @@ async function extractKmhdLink(
|
||||
const data = res.data;
|
||||
const hubDriveRes = data.match(/hubdrive_res:\s*"([^"]+)"/)[1];
|
||||
const hubDriveLink = data.match(
|
||||
/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/,
|
||||
/hubdrive_res\s*:\s*{[^}]*?link\s*:\s*"([^"]+)"/
|
||||
)[1];
|
||||
return hubDriveLink + hubDriveRes;
|
||||
}
|
||||
@@ -29,22 +27,17 @@ export const getStream = async function ({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter, gdFlixExtracter } = extractors;
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("katGetStream", link);
|
||||
try {
|
||||
if (link.includes("gdflix")) {
|
||||
return await gdflixExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await gdFlixExtracter(link, signal);
|
||||
}
|
||||
if (link.includes("kmhd")) {
|
||||
const hubcloudLink = await extractKmhdLink(link, providerContext);
|
||||
return await hubcloudExtractor(
|
||||
hubcloudLink,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
commonHeaders,
|
||||
);
|
||||
return await hubcloudExtracter(hubcloudLink, signal);
|
||||
}
|
||||
if (link.includes("gdflix")) {
|
||||
// resume link
|
||||
@@ -101,13 +94,7 @@ export const getStream = async function ({
|
||||
}
|
||||
return streamLinks;
|
||||
}
|
||||
const stereams = await hubcloudExtractor(
|
||||
link,
|
||||
signal,
|
||||
axios,
|
||||
cheerio,
|
||||
commonHeaders,
|
||||
);
|
||||
const stereams = await hubcloudExtracter(link, signal);
|
||||
return stereams;
|
||||
} catch (error: any) {
|
||||
console.log("katgetStream error: ", error);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -33,7 +32,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
@@ -50,7 +50,7 @@ export async function getStream({
|
||||
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;"]',
|
||||
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||
)
|
||||
.parent()
|
||||
.attr("href");
|
||||
@@ -74,7 +74,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if (filepressTokenRes.data?.status) {
|
||||
@@ -91,7 +91,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
@@ -106,7 +106,7 @@ export async function getStream({
|
||||
}
|
||||
}
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -33,7 +32,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
@@ -50,7 +50,7 @@ export async function getStream({
|
||||
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;"]',
|
||||
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||
)
|
||||
.parent()
|
||||
.attr("href");
|
||||
@@ -74,7 +74,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if (filepressTokenRes.data?.status) {
|
||||
@@ -91,7 +91,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
@@ -106,7 +106,7 @@ export async function getStream({
|
||||
}
|
||||
}
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
@@ -114,4 +114,4 @@ export async function getStream({
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Stream, ProviderContext } from "../types";
|
||||
import { gofileExtractor } from "../extractors/gofile";
|
||||
|
||||
function LALLJLutmoZpvvbikjaWM(str: string): ArrayBuffer {
|
||||
var buf = new ArrayBuffer(str.length * 2);
|
||||
@@ -24,7 +23,13 @@ export const getStream = async function ({
|
||||
link: string;
|
||||
providerContext: ProviderContext;
|
||||
}): Promise<Stream[]> {
|
||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||
const {
|
||||
axios,
|
||||
cheerio,
|
||||
commonHeaders: headers,
|
||||
extractors,
|
||||
} = providerContext;
|
||||
const { gofileExtracter } = extractors;
|
||||
function generateMessageToken(baseUrlL: string): string {
|
||||
const hostname = baseUrlL?.replace(/https?:\/\//, "").split("/")[0];
|
||||
console.log("generateMessageToken hostname", hostname);
|
||||
@@ -165,15 +170,14 @@ export const getStream = async function ({
|
||||
id: idData,
|
||||
});
|
||||
console.log("idData", idData);
|
||||
}),
|
||||
})
|
||||
);
|
||||
await Promise.all(
|
||||
secondIdList.map(async (id) => {
|
||||
const idRes = await axios.post(`${baseUrl}/tmp/${id.id}`);
|
||||
if (idRes.data.ppd["gofile.io"]) {
|
||||
const goRes = await gofileExtractor(
|
||||
idRes.data.ppd["gofile.io"].link.split("/").pop(),
|
||||
axios,
|
||||
const goRes = await gofileExtracter(
|
||||
idRes.data.ppd["gofile.io"].link.split("/").pop()
|
||||
);
|
||||
console.log("link", goRes.link);
|
||||
if (goRes.link) {
|
||||
@@ -190,7 +194,7 @@ export const getStream = async function ({
|
||||
});
|
||||
}
|
||||
}
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
return streamLinks;
|
||||
|
||||
@@ -2,13 +2,30 @@ import axios from "axios";
|
||||
import { getBaseUrl } from "./getBaseUrl";
|
||||
import { headers } from "./headers";
|
||||
import * as cheerio from "cheerio";
|
||||
import { hubcloudExtracter } from "./hubcloudExtractor";
|
||||
import { gofileExtracter } from "./gofileExtracter";
|
||||
import { superVideoExtractor } from "./superVideoExtractor";
|
||||
import { gdFlixExtracter } from "./gdflixExtractor";
|
||||
import { ProviderContext } from "./types";
|
||||
import Aes from "react-native-aes-crypto";
|
||||
|
||||
/**
|
||||
* Context for provider functions.
|
||||
* This context is used to pass common dependencies to provider functions.
|
||||
*/
|
||||
|
||||
const extractors = {
|
||||
hubcloudExtracter,
|
||||
gofileExtracter,
|
||||
superVideoExtractor,
|
||||
gdFlixExtracter,
|
||||
};
|
||||
|
||||
export const providerContext: ProviderContext = {
|
||||
axios,
|
||||
getBaseUrl,
|
||||
commonHeaders: headers,
|
||||
Aes,
|
||||
cheerio,
|
||||
extractors,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -33,12 +32,13 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
export async function superVideoExtractor(data: any) {
|
||||
try {
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex =
|
||||
/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(data);
|
||||
let p = "";
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
|
||||
p = encodedString.split("',36,")?.[0].trim();
|
||||
let a = 36;
|
||||
let c = encodedString.split("',36,")[1].slice(2).split("|").length;
|
||||
let k = encodedString.split("',36,")[1].slice(2).split("|");
|
||||
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
var regex = new RegExp("\\b" + c.toString(a) + "\\b", "g");
|
||||
p = p.replace(regex, k[c]);
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('Decoded String:', p);
|
||||
} else {
|
||||
console.log("No match found");
|
||||
}
|
||||
|
||||
const streamUrl = p?.match(/file:\s*"([^"]+\.m3u8[^"]*)"/)?.[1];
|
||||
console.log("streamUrl:", streamUrl);
|
||||
|
||||
return streamUrl || "";
|
||||
} catch (err) {
|
||||
console.error("SuperVideoExtractor Error:", err);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
export async function superVideoExtractor(data: any) {
|
||||
try {
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex =
|
||||
/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(data);
|
||||
let p = '';
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
|
||||
p = encodedString.split("',36,")?.[0].trim();
|
||||
let a = 36;
|
||||
let c = encodedString.split("',36,")[1].slice(2).split('|').length;
|
||||
let k = encodedString.split("',36,")[1].slice(2).split('|');
|
||||
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
var regex = new RegExp('\\b' + c.toString(a) + '\\b', 'g');
|
||||
p = p.replace(regex, k[c]);
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('Decoded String:', p);
|
||||
} else {
|
||||
console.log('No match found');
|
||||
}
|
||||
|
||||
const streamUrl = p?.match(/file:\s*"([^"]+\.m3u8[^"]*)"/)?.[1];
|
||||
console.log('streamUrl:', streamUrl);
|
||||
|
||||
return streamUrl || '';
|
||||
} catch (err) {
|
||||
console.error('SuperVideoExtractor Error:', err);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -135,4 +135,13 @@ export type ProviderContext = {
|
||||
getBaseUrl: (providerValue: string) => Promise<string>;
|
||||
commonHeaders: Record<string, string>;
|
||||
cheerio: typeof cheerio;
|
||||
extractors: {
|
||||
hubcloudExtracter: (link: string, signal: AbortSignal) => Promise<Stream[]>;
|
||||
gofileExtracter: (id: string) => Promise<{
|
||||
link: string;
|
||||
token: string;
|
||||
}>;
|
||||
superVideoExtractor: (data: any) => Promise<string>;
|
||||
gdFlixExtracter: (link: string, signal: AbortSignal) => Promise<Stream[]>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -33,7 +32,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
@@ -50,7 +50,7 @@ export async function getStream({
|
||||
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;"]',
|
||||
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||
)
|
||||
.parent()
|
||||
.attr("href");
|
||||
@@ -74,7 +74,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if (filepressTokenRes.data?.status) {
|
||||
@@ -91,7 +91,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
@@ -106,7 +106,7 @@ export async function getStream({
|
||||
}
|
||||
}
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ProviderContext, Stream } from "../types";
|
||||
import { hubcloudExtractor } from "../extractors/hubcloud";
|
||||
|
||||
const headers = {
|
||||
Accept:
|
||||
@@ -32,7 +31,8 @@ export async function getStream({
|
||||
signal: AbortSignal;
|
||||
providerContext: ProviderContext;
|
||||
}) {
|
||||
const { axios, cheerio, commonHeaders } = providerContext;
|
||||
const { axios, cheerio, extractors } = providerContext;
|
||||
const { hubcloudExtracter } = extractors;
|
||||
try {
|
||||
const streamLinks: Stream[] = [];
|
||||
console.log("dotlink", link);
|
||||
@@ -49,7 +49,7 @@ export async function getStream({
|
||||
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;"]',
|
||||
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
|
||||
)
|
||||
.parent()
|
||||
.attr("href");
|
||||
@@ -73,7 +73,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressTokenRes', filepressTokenRes.data);
|
||||
if (filepressTokenRes.data?.status) {
|
||||
@@ -90,7 +90,7 @@ export async function getStream({
|
||||
"Content-Type": "application/json",
|
||||
Referer: filepressBaseUrl,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
// console.log('filepressStreamLink', filepressStreamLink.data);
|
||||
streamLinks.push({
|
||||
@@ -105,7 +105,7 @@ export async function getStream({
|
||||
}
|
||||
}
|
||||
|
||||
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
|
||||
return await hubcloudExtracter(link, signal);
|
||||
} catch (error: any) {
|
||||
console.log("getStream error: ", error);
|
||||
if (error.message.includes("Aborted")) {
|
||||
|
||||
Reference in New Issue
Block a user