Skip to content

Instantly share code, notes, and snippets.

Forked from ldong/
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:


You will get the following list
  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';
  1. Sort videos by time created to watch them in order
Copy link

it is not working on pro member videos.

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

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

Copy link

siberianbear commented Aug 21, 2016

Does not work for me.
Now real links to video looks like:[randomphrase]/file.mp4

Copy link

ellerbrock commented Sep 6, 2016

Egghead Video Download

Quick Introduction how to Download Egghead Videos for Offline View.


Copy link

smahi commented Sep 24, 2016

Egghead video download using NIX tools


Copy link

yhaskell commented May 13, 2017

My answer to that:


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



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

my @matches = $lesson_page =~ /<a href="(https:\/\/\/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) {
    &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`;

Copy link

These solutions aren't working anymore

Copy link

youtube-dl fails to download videos now

Copy link

mtusman commented Aug 2, 2017

Just go on this website 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

Copy link

larry27 commented Aug 15, 2017

Hi everyone. I created package for downloading videos from egghead. Welcome

Copy link

shivamkr19 commented Oct 3, 2017

Download free 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

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


Copy link

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

Copy link

indefinitelee commented Nov 20, 2017

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

Copy link

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

Copy link

uiyuvi commented Dec 8, 2017

How to download with audio.. I have tried may attempts stills getting only vieo or only audio... i couldn't get to download audio+video together

Copy link

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

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

Copy link

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

Copy link

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

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

Copy link

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

Copy link

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

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

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

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

Copy link

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

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

Copy link

shivamkr19 commented Oct 5, 2019 via email

Copy link

please i've tried throughout the night to download series of

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

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');});.

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!

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