update
This commit is contained in:
+54
-86
@@ -110,109 +110,56 @@ async function extractStreamUrl(url) {
|
||||
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"
|
||||
"Referer": "https://coflix.dance",
|
||||
"origin": "https://coflix.dance"
|
||||
};
|
||||
|
||||
console.log("Iframe URL: " + 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);
|
||||
const uqloadMatch = iframeHtml.match(/showVideo\('([^']+)'[^\)]+\)">\s*<img[^>]+uqload/i);
|
||||
if (uqloadMatch) {
|
||||
const uqload = atob(uqloadMatch[1]);
|
||||
console.log("Uqload URL:" + uqload);
|
||||
const uqResp = await fetchv2(uqload);
|
||||
const uqHtml = await uqResp.text();
|
||||
|
||||
let uqMatchUrl = null;
|
||||
const obfuscatedScriptMatch = uqHtml.match(/<script[^>]*>\s*(eval\(function\(p,a,c,k,e,d.*?\)[\s\S]*?)<\/script>/);
|
||||
if (obfuscatedScriptMatch) {
|
||||
const deobfuscated = unpack(obfuscatedScriptMatch[1]);
|
||||
const m3u8Match = deobfuscated.match(/file:\s*"([^"]+\.m3u8[^"]*)"/i) || deobfuscated.match(/sources:\s*\[\s*\{\s*file:\s*"([^"]+\.m3u8[^"]*)"/i);
|
||||
if (m3u8Match) {
|
||||
uqMatchUrl = m3u8Match[1];
|
||||
} else {
|
||||
const mp4Match = deobfuscated.match(/sources:\s*\[\s*"([^"]+\.mp4)"/);
|
||||
if (mp4Match) uqMatchUrl = mp4Match[1];
|
||||
}
|
||||
} else {
|
||||
const mp4Match = uqHtml.match(/sources:\s*\[\s*"([^"]+\.mp4)"/);
|
||||
if (mp4Match) uqMatchUrl = mp4Match[1];
|
||||
}
|
||||
|
||||
const mp4Match = uqHtml.match(/sources:\s*\[\s*"([^"]+\.mp4)"/);
|
||||
if (mp4Match) {
|
||||
const mp4Url = mp4Match[1];
|
||||
console.log("MP4 URL:" + mp4Url);
|
||||
return mp4Url;
|
||||
if (uqMatchUrl) {
|
||||
console.log("Found Uqload Video URL: " + uqMatchUrl);
|
||||
return JSON.stringify({
|
||||
streams: [{
|
||||
title: "Uqload",
|
||||
streamUrl: uqMatchUrl,
|
||||
headers: { "Referer": uqload }
|
||||
}],
|
||||
subtitle: ""
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const fileMonMatch = iframeHtml.match(/<li[^>]*onclick="showVideo\('([^']+)',\s*'[^']+'\)">\s*<img[^>]*src="static\/server\/filemoon[^"]*"[^>]*>\s*<span>FileMon/i);
|
||||
if (fileMonMatch) {
|
||||
const filemoon = atob(fileMonMatch[1]);
|
||||
console.log("FileMon URL:" + 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);
|
||||
}
|
||||
|
||||
return "https://files.catbox.moe/avolvc.mp4";
|
||||
return JSON.stringify({ streams: [], subtitle: "" });
|
||||
|
||||
} catch (err) {
|
||||
return "https://files.catbox.moe/avolvc.mp4";
|
||||
return JSON.stringify({ streams: [], subtitle: "" });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* SCHEME START */
|
||||
/* {REQUIRED PLUGINS: unbaser} */
|
||||
|
||||
/**
|
||||
* @name filemoonExtractor
|
||||
* @author Cufiy - Inspired by Churly
|
||||
*/
|
||||
|
||||
async function filemoonExtractor(html, url = null) {
|
||||
// check if contains iframe, if does, extract the src and get the url
|
||||
const regex = /<iframe[^>]+src="([^"]+)"[^>]*><\/iframe>/;
|
||||
const match = html.match(regex);
|
||||
if (match) {
|
||||
console.log("Iframe URL: " + match[1]);
|
||||
const iframeUrl = match[1];
|
||||
const iframeResponse = await soraFetch(iframeUrl, {
|
||||
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,
|
||||
}
|
||||
});
|
||||
console.log("Iframe Response: " + iframeResponse.status);
|
||||
html = await iframeResponse.text();
|
||||
}
|
||||
// console.log("HTML: " + html);
|
||||
// get /<script[^>]*>([\s\S]*?)<\/script>/gi
|
||||
const scriptRegex = /<script[^>]*>([\s\S]*?)<\/script>/gi;
|
||||
const scripts = [];
|
||||
let scriptMatch;
|
||||
while ((scriptMatch = scriptRegex.exec(html)) !== null) {
|
||||
scripts.push(scriptMatch[1]);
|
||||
}
|
||||
// get the script with eval and m3u8
|
||||
const evalRegex = /eval\((.*?)\)/;
|
||||
const m3u8Regex = /m3u8/;
|
||||
// console.log("Scripts: " + scripts);
|
||||
const evalScript = scripts.find(script => evalRegex.test(script) && m3u8Regex.test(script));
|
||||
if (!evalScript) {
|
||||
console.log("No eval script found");
|
||||
return null;
|
||||
}
|
||||
const unpackedScript = unpack(evalScript);
|
||||
// get the m3u8 url
|
||||
const m3u8Regex2 = /https?:\/\/[^\s]+master\.m3u8[^\s]*?(\?[^"]*)?/;
|
||||
const m3u8Match = unpackedScript.match(m3u8Regex2);
|
||||
if (m3u8Match) {
|
||||
return m3u8Match[0];
|
||||
} else {
|
||||
console.log("No M3U8 URL found");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* REMOVE_START */
|
||||
|
||||
|
||||
class Unbaser {
|
||||
constructor(base) {
|
||||
this.ALPHABET = {
|
||||
@@ -333,4 +280,25 @@ async function soraFetch(url, options = { headers: {}, method: 'GET', body: null
|
||||
}
|
||||
/* REMOVE_END */
|
||||
|
||||
/* SCHEME END */
|
||||
/* SCHEME END */
|
||||
|
||||
function atob(input) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
let str = '';
|
||||
let buffer = 0;
|
||||
let bits = 0;
|
||||
for (let i = 0; i < input.length; i++) {
|
||||
const char = input.charAt(i);
|
||||
if (char === '=') break;
|
||||
const index = chars.indexOf(char);
|
||||
if (index === -1) continue;
|
||||
buffer = (buffer << 6) | index;
|
||||
bits += 6;
|
||||
if (bits >= 8) {
|
||||
bits -= 8;
|
||||
str += String.fromCharCode((buffer >> bits) & 0xFF);
|
||||
buffer &= (1 << bits) - 1;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"name": "50/50",
|
||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
||||
},
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"language": "French",
|
||||
"streamType": "HLS",
|
||||
"quality": "1080p",
|
||||
|
||||
Reference in New Issue
Block a user