function evalJson(str) { try { return json5.parse(str); } catch (e) {} }
async function scrape(embedURL) { const {body} = await got(embedURL); let sources = sourcesRegex.exec(body); if (sources && sources[1]) { sources = JSON5.parse(sources[1]); } return sources; }
async function scrape(embedURL) { const fid = embedURL.split('/')[4]; const {body} = await got(`https://megaxfer.ru/player?fid=${fid}&page=embed`, {json: true}); const {html} = body; const regexData = REGEX.exec(html); if (!regexData || !regexData[1]) { return null; } return json5.parse(regexData[1]); }
async function scrape(embedURL) { if (!embedURL.includes('embed-')) { const id = embedURL.split('/').pop(); embedURL = `https://flix555.com/embed-${id}.html`; } const {body} = await got(embedURL); if (body.includes('File is no longer available as it expired or has been deleted')) { return null; } const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); const parsed = json5.parse(sources[1]); return parsed; }
async function scrape(embedURL) { const response = await got(embedURL); const body = response.body; if (body.includes('The file you were looking for could not be found, sorry for any inconvenience')) { return null; } const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); const parsed = json5.parse(sources[1]); return parsed; }
_loadConfigFile(file) { const extname = path.extname(file) if(extname === '.json') { // eslint-disable-next-line no-sync return JSON5.parse(fs.readFileSync(file)) } else if(extname !== '.js') { throw new Error(`Unsupported config file extension: ${extname}`) } const { default: config } = require(file) || { } if(config.isNil) { throw new Error(`Config files must contain a default export: ${file}`) } if(typeof config === 'function') { return config() } else if(typeof config === 'object') { return config } throw new Error(`Invalid config file export for default: ${file}`) }
async function searchFromData(channel) { const data = []; try { const list = await ConfigsModel.search(channel); list.forEach(item => { const result = JSON5.parse(item.result_data); data.push({ result, state: item.state, task_start_time: item.task_start_time, task_end_time: item.task_end_time, proption: item.proption }); }); } catch (error) { console.log(error); } return data; }
var fileContents = fs.readFileSync(filePath, 'utf8'); config = json5.parse(fileContents.replace(/^\s*#.*$/mg,'')); if (!quiet) { console.log('Using ' + configFileType + ' file "' + fs.realpathSync(filePath) + '".');
async function scrape(embedURL) { const response = await got(embedURL); const body = response.body; const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); const parsed = json5.parse(sources[1]); return parsed; }
execPhp('../lib/unpacker.php', '/usr/bin/php', function (error, php, output) { php.nodeunpack(found, function (error, result, output, printed) { if (error) { mp4 = ''; } else { try { var mp4Regex = /sources:\s*(\[.*?\])/s; var json = mp4Regex.exec(result); json = json5.parse(json[1]); if (json && json.length == 1) mp4 = json[0].file; else if(json && json.length > 1){ for (var h = 0; h < json.length; h++) if (json[h].file.includes('v.mp4')) mp4 = json[h].file; mp4 = mp4 && mp4 != '' ? mp4 : ''; } } catch (errr) { } } mp4 = mp4 == null ? '' : mp4; res.json({ status: mp4 == '' ? 'error' : 'ok', url: mp4 }); }); });
}); const data = JSON5.parse(format);
async function scrape(embedURL) { const {body} = await got(embedURL, { rejectUnauthorized: false }); const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); const parsed = json5.parse(sources[1]); return parsed; }
async function scrape(embedURL) { const {body} = await got(embedURL); const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); const parsed = json5.parse(sources[1]); return parsed; }
async function scrape(embedURL) { var parsed = null; try { const response = await got(embedURL); const body = response.body; const packed = packedRegex.exec(body)[1]; const unpacked = unpacker.unPack(packed); const sources = jsonRegex.exec(unpacked); parsed = json5.parse(sources[1]); } catch (err) { } return parsed; }