M3U8 Auto Stream Deployer commited on
Commit ·
cb9cf48
1
Parent(s): 7b59224
Deploy full project code with Docker runtime
Browse filesFiles changed (4)
- data/config.json+1-1
- server.ts+19-19
- test-fifa-lines.tsAdded+25
- yallashoot_playlist.m3uDeleted-1
5 unmodified lines67899105 unmodified lines "hfToken": "", "hfSpace": "subrato1/streamapi", "channels": [], "lastUpdated": "2026-06-28T08:21:53.775Z" "lastUpdated": "2026-06-28T08:26:35.316Z"}85 unmodified lines8687888989909192437 unmodified lines5305315325335345335345355365375385395385395405415429 unmodified lines5525535545555555565575585 unmodified lines5645655665675675685695709 unmodified lines5805815825835835845855865875885895905915905915925935945 unmodified lines6006016026036036046056066076076086096105 unmodified lines6166176186196206216226196206216226236246256246256266276287 unmodified lines63663763863963964064164285 unmodified lines }; }), ...(data.channels || []) .filter((savedCh: any) => savedCh.id && savedCh.id.startsWith("rugby-")) .filter((savedCh: any) => savedCh.id && (savedCh.id.startsWith("fifa-") || savedCh.id.startsWith("rugby-"))) .map((savedCh: any) => ({ id: savedCh.id, name: savedCh.name,437 unmodified lines }}
// Discover rugby streams from footystream.pkasync function discoverRugbyStreams(): Promise<Channel[]> {// Discover FIFA World Cup streams from footystream.pkasync function discoverFifaStreams(): Promise<Channel[]> { const discovered: Channel[] = []; const ua = appConfig.userAgent; try { globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Initiating fetch for https://footystream.pk/rugby-streams`); const mainHtml = await fetchTextWithTimeout("https://footystream.pk/rugby-streams", { globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Initiating fetch for https://footystream.pk/leagues/fifa-world-cup`); const mainHtml = await fetchTextWithTimeout("https://footystream.pk/leagues/fifa-world-cup", { headers: { "User-Agent": ua } }); 9 unmodified lines }
const eventList = Array.from(events); globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Found ${eventList.length} rugby event pages.`); globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Found ${eventList.length} FIFA World Cup event pages.`);
for (const eventUrl of eventList) { try {5 unmodified lines .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(" ");
globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Processing event: ${eventTitle}`); globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Processing event: ${eventTitle}`); const eventHtml = await fetchTextWithTimeout(eventUrl, { headers: { "User-Agent": ua } });9 unmodified lines }
const serverList = Array.from(alphaServers); globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Found ${serverList.length} alpha server(s) for event.`); globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Found ${serverList.length} alpha server(s) for event.`);
for (const serverUrl of serverList) { const serverIdMatch = serverUrl.match(/\/alpha\/[^/]+\/(\d+)/i); const serverId = serverIdMatch ? serverIdMatch[1] : "1"; discovered.push({ id: `rugby-${eventSlug}-${serverId}`, name: `Rugby: ${eventTitle} - Server ${serverId}`, id: `fifa-${eventSlug}-${serverId}`, name: `FIFA: ${eventTitle} - Server ${serverId}`, url: serverUrl, logo: "https://cdn-icons-png.flaticon.com/512/3076/3076841.png", overrideUrl: "",5 unmodified lines }); } } catch (err: any) { globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Failed to process event ${eventUrl}: ${err.message}`); globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Failed to process event ${eventUrl}: ${err.message}`); } } } catch (err: any) { globalLogs.push(`[${new Date().toISOString()}] Rugby Discovery: Failed: ${err.message}`); globalLogs.push(`[${new Date().toISOString()}] FIFA Discovery: Failed: ${err.message}`); } return discovered;}5 unmodified lines globalLogs = [`[${new Date().toISOString()}] Started live streaming extractor cycle.`];
try { // Dynamically discover Rugby streams and update configuration channels const discoveredRugby = await discoverRugbyStreams(); const staticChannels = appConfig.channels.filter(ch => !ch.id.startsWith("rugby-")); const existingRugby = appConfig.channels.filter(ch => ch.id.startsWith("rugby-")); // Dynamically discover FIFA streams and update configuration channels const discoveredFifa = await discoverFifaStreams(); const staticChannels = appConfig.channels.filter(ch => !ch.id.startsWith("fifa-") && !ch.id.startsWith("rugby-")); const existingFifa = appConfig.channels.filter(ch => ch.id.startsWith("fifa-"));
const mergedRugby = discoveredRugby.map(newCh => { const match = existingRugby.find(oldCh => oldCh.id === newCh.id); const mergedFifa = discoveredFifa.map(newCh => { const match = existingFifa.find(oldCh => oldCh.id === newCh.id); if (match) { return { ...newCh,7 unmodified lines return newCh; });
appConfig.channels = [...staticChannels, ...mergedRugby]; appConfig.channels = [...staticChannels, ...mergedFifa]; saveConfig();
const total = appConfig.channels.length;12345678910111213141516171819202122232425import fetch from "node-fetch";
async function checkEvent() { const ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"; try { const eventUrl = "https://footystream.pk/events/brazil-vs-japan"; const res = await fetch(eventUrl, { headers: { "User-Agent": ua } }); const html = await res.text(); // Print lines containing 'Server', 'iframe', 'alpha', 'stream', or 'play' const lines = html.split("\n"); console.log("Matching lines in HTML:"); lines.forEach((line, i) => { const lower = line.toLowerCase(); if (lower.includes("server") || lower.includes("iframe") || lower.includes("alpha") || lower.includes("stream") || lower.includes("play") || lower.includes("embed") || lower.includes("href")) { console.log(`${i+1}: ${line.trim()}`); } });
} catch (err: any) { console.error("Error:", err.message); }}
checkEvent();1#EXTM3Udata/config.json+1-1
server.ts+19-19
test-fifa-lines.tsAdded+25
yallashoot_playlist.m3uDeleted-1