Skip to content

Instantly share code, notes, and snippets.

Last active December 7, 2023 16:16
Show Gist options
  • Save ldong/b289d56090f98d02423c to your computer and use it in GitHub Desktop.
Save ldong/b289d56090f98d02423c to your computer and use it in GitHub Desktop.
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App


$.each($('h4 a'), function(index, video){

You will get the following list


  1. Save as list.txt

  2. brew install youtube-dl

  3. youtube-dl -a list.txt

Run this rename script to get rid of the Mojibake

for i in *mp4; do
   mv "$i" "`echo $i | sed "s/#.*//"`"'.mp4';
Copy link

shivamkr19 commented Oct 5, 2017

@jasonzhouu @npasparuhov
In order to download videos using youtube-dl, this method currently works as of october 2017.



m3u8 is a playlist format which you can download using youtube-dl or FFMPEG. It is like a text file you can open in any text editor.

  • Copy the url and run the following command in terminal.
youtube-dl ""

If you are a Console/Linux/Mac Poweruser, You can take a look at my gist to make this process simple.

Copy link

Y-Taras commented Oct 7, 2017

Here's a screenshot with error from that particular video that you've mentioned:
screenshot from 2017-10-07 08 37 15
What am I doing wrong?..

Copy link

Copy link

@Shivamkrjha this method works for free videos so what about the PRO contect any idea how to get them?

Copy link

azdanov commented Dec 4, 2017

youtube-dl -cio '%(autonumber)s-%(title)s.%(ext)s' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' --restrict-filenames

To download a course with best video/audio quality and a format of 00001-Introduction_to_The_Beginner_s_Guide_to_ReactJS.mp4

Copy link

@azdanov, Thanks!

Copy link

Downloaded separate audio file & video file. So, would you please tell me how to resolve this issue.


Copy link

@azdanov, Thanks, buddy!

Copy link

@janaka120 install ffmpeg and then try it agian.

In mac, brew install ffmpeg

Copy link

Thank you @azdanov 🏄‍♂️

Copy link

tuanluu-agilityio commented Dec 5, 2017

On MacOS:

brew install youtube-dl

Note: youtube-dl just download courses FREE not PRO.

It's work fine for me. Thanks!

Copy link

ufthelp commented Dec 5, 2017

3 easy steps for MacOS:

1. brew install youtube-dl

2. brew install ffmpeg

Note: Without installing ffmpeg, youtube-dl will download separate audio file & video file.

3. youtube-dl <video-url>

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

@shivamkr19 - thank you. It's inelegant, but it works. Maybe it's the best we can do for now.

Copy link

amrdraz commented Jan 9, 2018

I noticed that you can download the entire series by visiting while loggedin



You should get something like this

  "title":"Advanced React Component Patterns",

Copy the value of the download_url key and open it in the browser.
This will download the entire series as a zip file.

the zip file tends to be pretty big though, but then you could always go through each lesson and call the download_url for that lesson

or write a script that does that XD

Copy link

Leyart commented May 15, 2018

using the APIs to download the zip is definitely working for me and it is an elegant and quick solution, thanks

Copy link

eaorak commented Jun 19, 2018

@amrdraz, it works, thanks 👍

Copy link

eaorak commented Jun 20, 2018

I've created a simple project to download egghead videos by using the approach suggested by @amrdraz. It works fine atm. It uses Puppeteer to log in and call the egghead api. Comments and contributions are more than welcome.

Copy link

cuylerstuwe commented Jul 2, 2018

I wrote a short userscript a couple months ago which allows Pro users to download videos or courses from the browser by appending #dl to the end of the URL.

It uses the API routes that @amrdraz found.

To install it, you need to have a userscript management extension added to your browser (I recommend Tampermonkey), then you click the Raw button in the Gist. The extension will recognize the URL pattern and prompt you to install:

Copy link

I use this to get the video links, August 2018

var links = ""
$("a[data-click-handler=true]").each(function(ind , elem) {
    if(elem.href.match(/^https:\/\/\/lessons/) ) 
		links += elem.href + "\n"; 

Copy link

@goldnetonline how to use your script ?

Copy link

Akshay090 commented Oct 8, 2018

Just go to the Course page and paste the link in console

Copy link

Gyvastis commented Oct 8, 2018

Should this suppose to work for premium content as well?

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

copy([ Set(Array.from(document.querySelectorAll('[href^="/lessons"]')).map(a => a.href))].join('\n'))

Copy link

ijasxyz commented Apr 1, 2019

copy([ Set(Array.from(document.querySelectorAll('[href^="/lessons"]')).map(a => a.href))].join('\n'))

Add a '/' after lessons to ignore /lessons link,

copy([ Set(Array.from(document.querySelectorAll('[href^="/lessons/"]')).map(a => a.href))].join('\n'))

Copy link

I have read all the comments but still I could not download anythings.I will appreciate if some helps me to download some videos

Copy link

Protected content can be downloaded via the --add-header= flag. Courses already have a download button but Collections do not.

youtube-dl -a playlist.txt --add-header=Cookie:"ahoy_visitor=...."

Copy link

I have read all the comments but still I could not download anythings.I will appreciate if some helps me to download some videos

I did got those links by following instructions above, but youtube-dl gave me "URL not supported error"

so far I'm only able to download these links, which is pretty useless

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