Skip to content

Instantly share code, notes, and snippets.

@corporatepiyush
Last active September 4, 2017 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corporatepiyush/7aa8c1c5000e84f14d65023933034433 to your computer and use it in GitHub Desktop.
Save corporatepiyush/7aa8c1c5000e84f14d65023933034433 to your computer and use it in GitHub Desktop.
Extract Unique Youtube URL from Given Page or Playlist Page with Jquery
// download audio files and convert them to mp3
cat links.txt | xargs -n1 -P2 youtube-dl --extract-audio --audio-format mp3 --audio-quality 9
function extractUrl() {
const links = $("a[href^='/watch?v=']").map((_, el) => el.href.split("&")[0]).toArray()
const uniqueLinks = Array.from(new Set(links))
return uniqueLinks
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment