Skip to content

Instantly share code, notes, and snippets.

@lekoOwO

lekoOwO/getM3u8.bookmark.js Secret

Last active Jun 29, 2021
Embed
What would you like to do?
Get m3u8 link for a youtube stream
javascript:(async()=>{try{const t=await fetch(location.href),a=await t.text(),r=/"hlsManifestUrl":"([^"]+)/,e=a.match(r)[1];navigator.clipboard.writeText(e),alert("Copied!")}catch(t){console.error(t),alert("Error!")}})();
(async () => {
try {
const resp = await fetch(location.href);
const html = await resp.text()
const regex = /"hlsManifestUrl":"([^"]+)/;
const match = html.match(regex);
const result = match[1];
navigator.clipboard.writeText(result);
alert("Copied!")
} catch (e) {
console.error(e)
alert("Error!")
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment