Last active
June 20, 2016 14:35
-
-
Save ganapativs/d81f1646afdbe574f2ef2b04088c89b1 to your computer and use it in GitHub Desktop.
Egghead lessons downloading
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
* Download and install react developers tool from here - https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en | |
* Open egghead lesson's page you want to download, and open console. | |
* Go to react(Added by react developer tools) tab in console and inspect and search by Component Name <NextUpLessonList> and select. | |
* Now go to console tab and run: $r.state.list.lessons.map(function(e){console.log(e.lesson_http_url)}) to get lessons list. | |
* Copy list and convert it to a JS array, like | |
["https://egghead.io/lessons/tools-intro-to-the-production-webpack-course", | |
"https://egghead.io/lessons/tools-validate-your-webpack-config-with-webpack-validator", | |
"https://egghead.io/lessons/tools-tree-shaking-with-webpack-2", | |
"https://egghead.io/lessons/tools-polyfill-promises-for-webpack-2", | |
"https://egghead.io/lessons/tools-maintain-sane-file-sizes-with-webpack-code-splitting", | |
"https://egghead.io/lessons/tools-hashing-with-webpack-for-long-term-caching",....]. | |
* install egghead-downloader using npm -> npm install -g --production egghead-downloader | |
* Run node and execute this code and wait for the process to complete to download all lessons | |
<code> | |
var links = <Lesson links array>; | |
var sys = require('sys'); | |
var exec = require('child_process').execSync; | |
function puts(error, stdout, stderr) { sys.puts(stdout) } | |
for(i =0; i< links.length; i++){exec("egghead-downloader -c "+links[i]+" -f -output-dir ./", puts);} | |
</code> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment