From 7d9f1706014d6f5a1d8709a499c862e7e539a1c8 Mon Sep 17 00:00:00 2001 From: Inside4ndroid Date: Sat, 15 Feb 2025 08:22:17 +0000 Subject: [PATCH] remove unused provider --- index.js | 20 -------------------- src/asiaheroku.js | 44 -------------------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 src/asiaheroku.js diff --git a/index.js b/index.js index 65cb1c8..239d7ab 100644 --- a/index.js +++ b/index.js @@ -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}`); }); \ No newline at end of file diff --git a/src/asiaheroku.js b/src/asiaheroku.js deleted file mode 100644 index e1c4e52..0000000 --- a/src/asiaheroku.js +++ /dev/null @@ -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(/