Skip to content

Instantly share code, notes, and snippets.

@jcubic
Created August 29, 2012 20:21
Show Gist options
  • Save jcubic/3518347 to your computer and use it in GitHub Desktop.
Save jcubic/3518347 to your computer and use it in GitHub Desktop.
log list of YouTube id and titles from playlist
console.log(Array.prototype.slice.call(document.querySelectorAll('.playlist-landing ol li a')).map(function(a) { return a.getAttribute('href').match(/(v=[^&]+)/)[1] + ' ' + a.innerHTML.match(/(class="title.*?)<\/span>/)[1].replace(/.*>/,''); }).join("\n"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment