mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
minify again
This commit is contained in:
51
dist/superVideoExtractor.js
vendored
51
dist/superVideoExtractor.js
vendored
@@ -1,50 +1 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.superVideoExtractor = superVideoExtractor;
|
||||
function superVideoExtractor(data) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b;
|
||||
try {
|
||||
// Step 1: Extract the function parameters and the encoded string
|
||||
var functionRegex = /eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/;
|
||||
var match = functionRegex.exec(data);
|
||||
let p = '';
|
||||
if (match) {
|
||||
// var params = match[1].split(',').map(param => param.trim());
|
||||
var encodedString = match[2];
|
||||
// console.log('Parameters:', params);
|
||||
// console.log('Encoded String:', encodedString.split("',36,")[0], '🔥🔥');
|
||||
p = (_a = encodedString.split("',36,")) === null || _a === void 0 ? void 0 : _a[0].trim();
|
||||
let a = 36;
|
||||
let c = encodedString.split("',36,")[1].slice(2).split('|').length;
|
||||
let k = encodedString.split("',36,")[1].slice(2).split('|');
|
||||
while (c--) {
|
||||
if (k[c]) {
|
||||
var regex = new RegExp('\\b' + c.toString(a) + '\\b', 'g');
|
||||
p = p.replace(regex, k[c]);
|
||||
}
|
||||
}
|
||||
// console.log('Decoded String:', p);
|
||||
}
|
||||
else {
|
||||
console.log('No match found');
|
||||
}
|
||||
const streamUrl = (_b = p === null || p === void 0 ? void 0 : p.match(/file:\s*"([^"]+\.m3u8[^"]*)"/)) === null || _b === void 0 ? void 0 : _b[1];
|
||||
console.log('streamUrl:', streamUrl);
|
||||
return streamUrl || '';
|
||||
}
|
||||
catch (err) {
|
||||
console.error('SuperVideoExtractor Error:', err);
|
||||
return '';
|
||||
}
|
||||
});
|
||||
}
|
||||
"use strict";var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};function superVideoExtractor(data){return __awaiter(this,void 0,void 0,function*(){var _a,_b;try{var match=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(data);let p="";if(match){var encodedString=match[2];p=null===(_a=encodedString.split("',36,"))||void 0===_a?void 0:_a[0].trim();let a=36,c=encodedString.split("',36,")[1].slice(2).split("|").length,k=encodedString.split("',36,")[1].slice(2).split("|");for(;c--;)if(k[c]){var regex=new RegExp("\\b"+c.toString(a)+"\\b","g");p=p.replace(regex,k[c])}}return(null===(_b=null==p?void 0:p.match(/file:\s*"([^"]+\.m3u8[^"]*)"/))||void 0===_b?void 0:_b[1])||""}catch(err){return""}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.superVideoExtractor=superVideoExtractor;
|
||||
Reference in New Issue
Block a user