Skip to content

Instantly share code, notes, and snippets.

@christiangenco
Forked from ldong/download_egghead_videos.md
Last active January 29, 2024 03:16
Show Gist options
  • Save christiangenco/a91c6d7164f2e0bc6a3a to your computer and use it in GitHub Desktop.
Save christiangenco/a91c6d7164f2e0bc6a3a to your computer and use it in GitHub Desktop.
download egghead videos

Download videos from egghead

  1. Install the React Developer Tools Chrome Extension.

  2. Go to the egghead website, i.e. Getting Started with Redux

  3. Click View -> Developer -> Javascript Console, then the React tab, then the <NextUpLessonList ...> tag.

  4. Click back to the Console tab, then run:

$r.state.list.lessons.map(function(e){console.log(e.lesson_http_url)})

You will get the following list

https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree
https://egghead.io/lessons/javascript-redux-describing-state-changes-with-actions
https://egghead.io/lessons/javascript-redux-pure-and-impure-functions
https://egghead.io/lessons/javascript-redux-the-reducer-function
https://egghead.io/lessons/javascript-redux-writing-a-counter-reducer-with-tests
https://egghead.io/lessons/javascript-redux-store-methods-getstate-dispatch-and-subscribe
https://egghead.io/lessons/javascript-redux-implementing-store-from-scratch
https://egghead.io/lessons/javascript-redux-react-counter-example
https://egghead.io/lessons/javascript-redux-avoiding-array-mutations-with-concat-slice-and-spread
https://egghead.io/lessons/javascript-redux-avoiding-object-mutations-with-object-assign-and-spread
https://egghead.io/lessons/javascript-redux-writing-a-todo-list-reducer-adding-a-todo
https://egghead.io/lessons/javascript-redux-writing-a-todo-list-reducer-toggling-a-todo
https://egghead.io/lessons/javascript-redux-reducer-composition-with-arrays
https://egghead.io/lessons/javascript-redux-reducer-composition-with-objects
https://egghead.io/lessons/javascript-redux-reducer-composition-with-combinereducers
https://egghead.io/lessons/javascript-redux-implementing-combinereducers-from-scratch
https://egghead.io/lessons/javascript-redux-react-todo-list-example-adding-a-todo
https://egghead.io/lessons/javascript-redux-react-todo-list-example-toggling-a-todo
https://egghead.io/lessons/javascript-redux-react-todo-list-example-filtering-todos
https://egghead.io/lessons/javascript-redux-extracting-presentational-components-todo-todolist
https://egghead.io/lessons/javascript-redux-extracting-presentational-components-addtodo-footer-filterlink
https://egghead.io/lessons/javascript-redux-extracting-container-components-filterlink
https://egghead.io/lessons/javascript-redux-extracting-container-components-visibletodolist-addtodo
https://egghead.io/lessons/javascript-redux-passing-the-store-down-explicitly-via-props
https://egghead.io/lessons/javascript-redux-passing-the-store-down-implicitly-via-context
https://egghead.io/lessons/javascript-redux-passing-the-store-down-with-provider-from-react-redux
https://egghead.io/lessons/javascript-redux-generating-containers-with-connect-from-react-redux-visibletodolist
https://egghead.io/lessons/javascript-redux-generating-containers-with-connect-from-react-redux-addtodo
https://egghead.io/lessons/javascript-redux-generating-containers-with-connect-from-react-redux-footerlink
https://egghead.io/lessons/javascript-redux-extracting-action-creators
  1. Save as list.txt

  2. brew install youtube-dl

  3. youtube-dl -a list.txt

  4. Run this rename script to get rid of the Mojibake

for i in *mp4; do
   mv "$i" "`echo $i | sed "s/#.*//"`"'.mp4';
done
  1. Sort videos by time created to watch them in order
@a-eid
Copy link

a-eid commented Oct 26, 2018

this is a programatic way of doing what is described above,(( it's very basic ))
I might add to it later

https://github.com/a-eid/egghead-basic-downloader

@NightOwlCoder
Copy link

As of today, the solution from @shivamkr19 worked fine for me on mac bish bash 5.0.
I needed to install dependencies first, particularly ffmpeg for audio:

brew install youtube-dl
brew install lynx
brew install ffmpeg

Posted all here for easy to find, but came from @shivamkr19:

# set course or lesson url in url variable
url=https://egghead.io/courses/leverage-new-features-of-react-16

# Downloads source from URL, finds playlist links and uses youtube-dl to download them.
lynx -source $url | grep -o -e 'https://[^"]*.m3u8' | xargs -n1 youtube-dl -o "%(title)s.%(ext)s"

@NightOwlCoder
Copy link

Today I found a course where script above does not work:

https://egghead.io/courses/build-a-react-native-application-for-ios-and-android-from-start-to-finish

Anyone has any idea why the course would have only 2 videos as m3u8 ?

@shivamkr19
Copy link

shivamkr19 commented Oct 5, 2019 via email

@Austinmac56
Copy link

please i've tried throughout the night to download series of
https://egghead.io/lessons/react-a-beginners-guide-to-react-introduction
https://egghead.io/lessons/react-create-a-user-interface-with-vanilla-javascript-and-dom
https://egghead.io/lessons/react-create-a-user-interface-with-react-s-createelement-api
https://egghead.io/lessons/react-create-a-user-interface-with-react-s-jsx-syntax
https://egghead.io/lessons/react-use-jsx-effectively-with-react
https://egghead.io/lessons/react-render-two-elements-side-by-side-with-react-fragments
https://egghead.io/lessons/react-create-a-simple-reusable-react-component-50d59130
https://egghead.io/lessons/react-validate-custom-react-component-props-with-proptypes-9e1b5b13
https://egghead.io/lessons/react-understand-and-use-interpolation-in-jsx
https://egghead.io/lessons/react-rerender-a-react-application-bea3a0e6
https://egghead.io/lessons/react-style-react-components-with-classname-and-inline-styles
https://egghead.io/lessons/react-use-event-handlers-with-react-bd53256d
https://egghead.io/lessons/react-manage-state-in-a-react-component-with-the-usestate-hook
https://egghead.io/lessons/react-manage-side-effects-in-a-react-component-with-the-useeffect-hook
https://egghead.io/lessons/react-use-a-lazy-initializer-with-usestate
https://egghead.io/lessons/react-manage-the-useeffect-dependency-array
https://egghead.io/lessons/react-create-reusable-custom-hooks
https://egghead.io/lessons/react-manipulate-the-dom-with-react-refs-cad5c6be
https://egghead.io/lessons/react-understand-the-react-hook-flow
https://egghead.io/lessons/react-make-basic-forms-with-react-cfc2ec08
https://egghead.io/lessons/react-make-dynamic-forms-with-react-d69753ec
https://egghead.io/lessons/react-controlling-form-values-with-react-4627dd2d
https://egghead.io/lessons/react-using-react-error-boundaries-to-handle-errors-in-react-components
https://egghead.io/lessons/react-use-the-key-prop-when-rendering-a-list-with-react-12564a86
https://egghead.io/lessons/react-lifting-and-colocating-react-state
https://egghead.io/lessons/react-make-http-requests-with-react-2fc53967
https://egghead.io/lessons/react-handle-http-errors-with-react
https://egghead.io/lessons/react-install-and-use-react-devtools
https://egghead.io/lessons/react-build-and-deploy-a-react-application-with-codesandbox-github-and-netlify
https://egghead.io/lessons/react-a-beginners-guide-to-react-outro

i've used npm install youtube-dl with npm install ffmpeg yet is not downloading. what do i have to do?

@DrSwad
Copy link

DrSwad commented Sep 23, 2020

How did you know I was looking to download this exact same course? :0 Btw, the rename script didn't work for me for some reason. If anyone else is facing it too and got node installed, you can follow these two steps instead:

  1. Run node in the directory where you downloaded the videos (make sure there's no other files except the videos (you can do so by running ls -a) ).

  2. Open terminal and run const fs = require('fs'); const path = require('path'); const files = fs.readdirSync('.'); files.forEach(file => {const matches = file.match(/Redux - (.*?)-(\d*)\.mp4\.mp4/); fs.renameSync('./' + file, './' + matches[2] + ' - ' + matches[1] + '.mp4');});.

@nikolai-mitnik
Copy link

Hey guys, is there a way to download Premium Courses? I have an account, but can't download any of them with this or with youtube-dl, in the past like a year ago, I was downloading them using youtube-dl. Thanks in advance!

@zenkiet
Copy link

zenkiet commented Mar 26, 2022

how can i download the subtitle of the video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment