remove unused provider

This commit is contained in:
Inside4ndroid
2025-02-15 08:22:17 +00:00
parent af5b9a6996
commit 7d9f170601
2 changed files with 0 additions and 64 deletions
-20
View File
@@ -1,6 +1,5 @@
import express from "express";
import { getvidsrc } from "./src/vidsrcpro.js";
import { getasiaheroku } from "./src/asiaheroku.js";
const port = 3000;
@@ -36,25 +35,6 @@ app.get('/vidsrc/:tmdbId', async (req, res) => {
}
});
app.get('/asiaheroku/:tmdbId', async (req, res) => {
const id = req.params.tmdbId;
const season = req.query.s;
const episode = req.query.e;
try {
if (season && episode) {
const srcresponse = await getasiaheroku(id, season, episode);
res.status(200).json(srcresponse);
} else {
const vidsrcresponse = await getasiaheroku(id);
res.status(200).json(vidsrcresponse);
}
} catch (error) {
console.error('Error fetching data:', error);
res.status(500).json({ error: 'Failed to fetch data' });
}
});
app.listen(port, () => {
console.log(`Example app listening on port http://localhost:${port}`);
});
-44
View File
@@ -1,44 +0,0 @@
export async function getasiaheroku(tmdb_id, s, e) {
const DOMAIN = "https://asia.heroku.uk/";
const headers = {
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
'Referer': `${DOMAIN}`,
'Origin': `${DOMAIN}`,
};
try {
let urlSearch = '';
if(s && e){
urlSearch = `${DOMAIN}/embed/tv/${tmdb_id}/${s}/${e}`;
} else {
urlSearch = `${DOMAIN}/embed/movie/${tmdb_id}`;
}
const htmlSearch = await fetch(urlSearch, {
method: 'GET',
headers: headers,
});
const textSearch = await htmlSearch.text();
const sourceMatch = textSearch.match(/<source.?src="(.*?)".?type/);
const source = sourceMatch ? sourceMatch[1] : "";
const results = {
headers: {
"Referer": `${DOMAIN}`,
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
"Accept": "*/*"
},
sources: source,
subtitles: 'unsupported'
};
return results;
} catch (e) {
const results = {
headers: {},
sources: '',
subtitles: ''
};
return results;
}
}