const inp = "https://vixsrc.to/movie/569094/"; function out(x) { document.querySelector('#output').innerHTML = x; console.log(x); } async function simpleFetch(url) { let response = await fetch("https://api.codetabs.com/v1/proxy?quest=" + url); return response.text(); } const html = await simpleFetch(inp); const url = await html.match(/url:\s*'([^']+)'/)[1]; const token = await html.match(/'token':\s*'([^']+)'/)[1]; const expires = await html.match(/'expires':\s*'([^']+)'/)[1]; full_url = url + .m3u8?token=${token}&expires={expires}&h=1&lang=en