]*data-hash="([^"]+)"[^>]*>([\s\S]*?)<\/div>/g;
let hash = null;
+ const blockRegex = /
]*class="play-option"[^>]*data-hash="([^"]+)"[^>]*>[\s\S]*?streamwish\.to[\s\S]*?<\/a>/g;
let blockMatch;
while ((blockMatch = blockRegex.exec(html)) !== null) {
- const blockContent = blockMatch[2];
- if (/class="serv"[^>]*>uqload<\/span>/.test(blockContent)) {
- hash = blockMatch[1].trim();
+ const hashMatch = blockMatch[0].match(/data-hash="([^"]+)"/);
+ if (hashMatch) {
+ hash = hashMatch[1].trim();
break;
}
}
@@ -127,21 +113,22 @@ async function extractStreamUrl(url) {
console.log("Hash:"+ hash);
console.log("Token:"+ token);
- const embedResponse = await fetchv2("https://www.verseriesonline.net/hashembedlink", {}, "POST", `hash=${encodeURIComponent(hash)}&_token=${encodeURIComponent(token)}`);
+ const embedResponse = await fetchv2("https://www.verseriesonline.net/hashembedlink", { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, "POST", `hash=${encodeURIComponent(hash)}&_token=${encodeURIComponent(token)}`);
const embedJson = await embedResponse.json();
- const uqloadUrl = embedJson.link;
+ console.log("Embed JSON:"+ JSON.stringify(embedJson));
+ const embedUrl = embedJson.link;
- const someHtml = await fetchv2(uqloadUrl);
+ const someHtml = await fetchv2(embedUrl);
const someText = await someHtml.text();
- const finalUrl = await uqloadExtractor(someText, uqloadUrl);
+ const finalUrl = await streamwishExtractor(someText, embedUrl);
const streamObj = {
streams: [
{
title: "Server 1",
streamUrl: finalUrl,
headers: {
- referer: "https://uqload.cx/"
+ referer: ""
}
}
],
@@ -156,20 +143,129 @@ async function extractStreamUrl(url) {
/* SCHEME START */
/**
- * @name uqloadExtractor
- * @author scigward
+ * @name streamwishExtractor
+ * @author Ibro
*/
-async function uqloadExtractor(html, embedUrl) {
- try {
- const match = html.match(/sources:\s*\[\s*"([^"]+\.mp4)"\s*\]/);
- const videoSrc = match ? match[1] : "";
- return videoSrc;
- } catch (error) {
- console.log("uqloadExtractor error:", error.message);
- return null;
+async function streamwishExtractor(data, url = null) {
+ const obfuscatedScript = data.match(/