-
-
Save lekoOwO/9496093f3c5ada563ce2b616932dbf9e to your computer and use it in GitHub Desktop.
Get m3u8 link for a youtube stream
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!")}})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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