mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 13:16:21 +01:00
Update coflix/coflix.js
This commit is contained in:
parent
100959be80
commit
c22006f5a2
1 changed files with 13 additions and 2 deletions
|
|
@ -107,8 +107,14 @@ async function extractStreamUrl(url) {
|
|||
const iframeMatch = html.match(/<iframe[^>]+src="([^"]+)"/i);
|
||||
const iframeUrl = iframeMatch ? iframeMatch[1] : null;
|
||||
if (!iframeUrl) throw new Error("Iframe not found");
|
||||
const headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
||||
"Referer": url,
|
||||
"origin": "https://coflix.cc"
|
||||
};
|
||||
|
||||
const iframeResp = await fetchv2(iframeUrl);
|
||||
const iframeResp = await fetchv2(iframeUrl, headers);
|
||||
const iframeHtml = await iframeResp.text();
|
||||
|
||||
const uqloadMatch = iframeHtml.match(/<li[^>]*onclick="showVideo\('([^']+)',\s*'[^']+'\)">\s*<img[^>]*src="static\/server\/uqload[^"]*"[^>]*>\s*<span>Uqload/i);
|
||||
|
|
@ -130,7 +136,12 @@ async function extractStreamUrl(url) {
|
|||
if (fileMonMatch) {
|
||||
const filemoon = atob(fileMonMatch[1]);
|
||||
console.log("FileMon URL:" + filemoon);
|
||||
const fileResp = await fetchv2(filemoon);
|
||||
const headers2 = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
|
||||
"Referer": "https://lecteurvideo.com/"
|
||||
};
|
||||
const fileResp = await fetchv2(filemoon, headers2);
|
||||
const fileHtml = await fileResp.text();
|
||||
return filemoonExtractor(fileHtml, filemoon);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue