Last active
June 9, 2017 06:07
-
-
Save agnel/6a279027050393772484d6e035429da2 to your computer and use it in GitHub Desktop.
Extract Egghead.io Lesson urls from the DOM
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
/** | |
* 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