Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@binzailani3136
Copy link

binzailani3136 commented Jul 26, 2016

it is not working on pro member videos.

@ellerbrock
Copy link

ellerbrock commented Aug 8, 2016

cool, nice idear to get them on local disc.
one thing which bothered me is that i have some random files without any index.
because we are programmers and lazy we don't rename by hand :)

small update with autoindex via:
youtube-dl -o "%(autonumber)s-%(title)s.%(ext)s" -a list.txt

@kungwangtotvs
Copy link

kungwangtotvs commented Aug 9, 2016

this works for me on removing Mojibake

for i in *mp4; do
f=$(echo $i | cut -d"." -f1)
mv $i $f.mp4
done

@siberianbear
Copy link

siberianbear commented Aug 21, 2016

Does not work for me.
Now real links to video looks like: https://embedwistia-a.akamaihd.net/deliveries/[randomphrase]/file.mp4

@ellerbrock
Copy link

ellerbrock commented Sep 6, 2016

Egghead Video Download

Quick Introduction how to Download Egghead Videos for Offline View.

Repository: https://github.com/ellerbrock/egghead-video-download/

@smahi
Copy link

smahi commented Sep 24, 2016

Egghead video download using NIX tools

Repository: https://github.com/smahi/egghead-video-download

@yhaskell
Copy link

yhaskell commented May 13, 2017

My answer to that:

#!/usr/bin/perl


if ($#ARGV < 0 or $ARGV[0] eq '-h' or $ARGV[0] eq "--help") {
print <<EOF;
Usage: egghead-download URL [name-remove-pattern]
    URL: egghead.io course to download
    [name-remove-pattern]: thing that you want to remove from file names

EOF

exit(0);
}

my $lesson_page = `curl $ARGV[0]`;

my @matches = $lesson_page =~ /<a href="(https:\/\/egghead.io\/lessons\/[\w-]+)" class="/g;

my @matches_unique = do { my %seen; grep { !$seen{$_}++ } @matches };

my $count = $#matches_unique + 1;

print "Downloading $count lessons...\n";

my $j = 0;
foreach my $match (@matches_unique) {
    $j++;
    &download($match, $j < 10 ? "0$j" : $j);
}


sub download {
  $url = shift;
  $i = shift;

  $url =~ /\/([\w-]+)$/;
  my $title = $1;
  $title =~ s/-/ /g;

  if ($#ARGV > 0) {
    my $req = $ARGV[1];
    $title =~ s/$req//g;
  }
  print "Downloading $i. $title\n";
  `youtube-dl -o '$i. $title.mp4' $url\n`;
}

@muhammadfaizan
Copy link

muhammadfaizan commented Jul 10, 2017

These solutions aren't working anymore

@dmitriyK1
Copy link

dmitriyK1 commented Jul 13, 2017

youtube-dl fails to download videos now

@mtusman
Copy link

mtusman commented Aug 2, 2017

Just go on this website https://www.onlinevideoconverter.com/video-converter and click mp4 and insert the url of each of the videos you want to download. It's a hassle to do this manually but it works

@larry27
Copy link

larry27 commented Aug 15, 2017

Hi everyone. I created package for downloading videos from egghead. Welcome https://www.npmjs.com/package/egghead-crawler

@shivamkr19
Copy link

shivamkr19 commented Oct 3, 2017

Download free egghead.io videos

Install Youtube-dl and Lynx Console Browser for your OS.
Run the following commands on your terminal.

# 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"

Gist: https://gist.github.com/shivamkr19/1b964f64bfe04d9d54e0668c6223b765

@npasparuhov
Copy link

npasparuhov commented Oct 19, 2017

@Shivamkrjha it works only on free lessons, any idea about pro content?

@indefinitelee
Copy link

indefinitelee commented Nov 20, 2017

just using youtube-dl and the egghead link worked perfectly for me for free lessons

@Schabaani
Copy link

Schabaani commented Nov 26, 2017

I've downloaded videos, however, they don't have voice. What is the problem?

@uiyuvi
Copy link

uiyuvi commented Dec 8, 2017

How to download https://d2c5owlt6rorc3.cloudfront.net/build-a-toggle-component-294eac7226/build-a-toggle-component-294eac7226.m3u8 with audio.. I have tried may attempts stills getting only vieo or only audio... i couldn't get to download audio+video together

@daveivan
Copy link

daveivan commented Dec 10, 2017

For merge video + audio to one file, use youtube-dl with FFmpeg installed.

@uiyuvi
Copy link

uiyuvi commented Dec 28, 2017

i tried with ffmpeg as well but no luck :( at times i am getting No such file or directory error

@garrettmac
Copy link

garrettmac commented Jan 7, 2018

UPDATE: now you can do $r.props.children.props.course.course.download_url and it will give you a zip of the course with all videos

@steelersd
Copy link

steelersd commented Feb 1, 2018

In the React tab, I selected the following:

screen shot 2018-01-31 at 7 19 09 pm

Used the following query to capture the list in the Chrome console
$r.props.lessons.map(function(e){console.log(e.http_url)})

No Audio with video
Needed to run brew install ffmpeg for Mac

@aruprakshit
Copy link

aruprakshit commented May 2, 2018

can anyone put it on torrent? nothing works for me :/

@ravshansbox
Copy link

ravshansbox commented May 9, 2018

Array.from(document.querySelectorAll('a.lh-title')).map(e => e.href).join('\n')

@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

NightOwlCoder commented Sep 10, 2019

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

NightOwlCoder commented Oct 5, 2019

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

@Austinmac56
Copy link

Austinmac56 commented Apr 24, 2020

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

nikolai-mitnik commented Mar 13, 2022

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!

@Zenfection1412
Copy link

Zenfection1412 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