Skip to content

Instantly share code, notes, and snippets.

@agnel
Last active June 9, 2017 06:07
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 agnel/6a279027050393772484d6e035429da2 to your computer and use it in GitHub Desktop.
Save agnel/6a279027050393772484d6e035429da2 to your computer and use it in GitHub Desktop.
Extract Egghead.io Lesson urls from the DOM
/**
* Paste this in the console of a lesson page
*
* @return [Array] List of urls for a course
*/
$.map($('.up-next-list-item'), function(el) { return $(el).attr('href') });
/**
* Paste this on the courses page
* Tip: convert the list to String by append .join('\n')
*
* Example:
* Got to https://egghead.io/courses/wrangle-your-terminal-with-tmux and open Console from Developer Tools (Chrome)
* and paste the below code and it will return an array of lesson urls
*
* @return [Array] List of urls for a course
*/
$.map($('[class*="courseInfoLessonList"] [class*="title"]'), function(el) { return $(el).attr('href') });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment