Created
February 17, 2022 04:34
-
-
Save vishwarajanand/4ce5076cda63d0ac2d8df8cef4ea8ae1 to your computer and use it in GitHub Desktop.
JS snippet to check whether a YouTube video is available or not
This file contains hidden or 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
// Load a YT URL like https://www.youtube.com/watch?v=XYZABC | |
let is_not_available = ["video unavailable", "video isn't available"]. | |
some(needle => | |
document.getElementById("contents").textContent.toLowerCase().includes(needle)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment