Skip to content

Instantly share code, notes, and snippets.

@ldong
Last active November 17, 2025 13:01
Show Gist options
  • Select an option

  • Save ldong/b289d56090f98d02423c to your computer and use it in GitHub Desktop.

Select an option

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

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});

You will get the following list

https://egghead.io/lessons/react-building-a-react-js-app-notetaker-introduction
https://egghead.io/lessons/react-building-a-react-js-app-up-and-running-with-react-and-webpack
https://egghead.io/lessons/react-building-a-react-js-app-basic-routing-with-react-router
https://egghead.io/lessons/react-building-a-react-js-app-state-props-and-thinking-in-react
https://egghead.io/lessons/react-building-a-react-js-app-component-validation-with-proptypes
https://egghead.io/lessons/react-building-a-react-js-app-using-reactfire-to-add-data-persistence
https://egghead.io/lessons/react-building-a-react-js-app-managing-state-in-child-components
https://egghead.io/lessons/react-building-a-react-js-app-transitions-with-react-router
https://egghead.io/lessons/react-building-a-react-js-app-making-server-requests-in-react-with-axios
https://egghead.io/lessons/react-building-a-react-js-app-rendering-a-ui-of-dynamic-data
https://egghead.io/lessons/react-building-a-react-js-app-componentwillreceiveprops-and-react-router
https://egghead.io/lessons/react-building-a-react-js-app-es6-refactor-non-components
https://egghead.io/lessons/react-building-a-react-js-app-es6-refactor-createclass-to-javascript-classes-and-proptypes
https://egghead.io/lessons/react-building-a-react-js-app-es6-refactor-proptypes-in-es6
https://egghead.io/lessons/react-building-a-react-js-app-es6-refactor-routing-without-mixins
https://egghead.io/lessons/react-building-a-react-js-app-es6-refactor-firebase-and-react-binding-with-re-base

Steps:

  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';
done
@npasparuhov

Copy link
Copy Markdown

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

@azdanov

azdanov commented Dec 4, 2017

Copy link
Copy Markdown

youtube-dl -cio '%(autonumber)s-%(title)s.%(ext)s' -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' https://egghead.io/courses/the-beginner-s-guide-to-reactjs --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

@gopiborra

Copy link
Copy Markdown

@azdanov, Thanks!

@janaka120

Copy link
Copy Markdown

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

Thanks.

@abhishek-nigam

Copy link
Copy Markdown

@azdanov, Thanks, buddy!

@zeenfaizpy

Copy link
Copy Markdown

@janaka120 install ffmpeg and then try it agian.

In mac, brew install ffmpeg

@corysimmons

Copy link
Copy Markdown

Thank you @azdanov 🏄‍♂️

@tuanluu-agilityio

tuanluu-agilityio commented Dec 5, 2017

Copy link
Copy Markdown

On MacOS:

brew install youtube-dl
youtube-dl https://egghead.io/courses/the-beginner-s-guide-to-reactjs

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

It's work fine for me. Thanks!

@ufthelp

ufthelp commented Dec 5, 2017

Copy link
Copy Markdown

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>

@uiyuvi

uiyuvi commented Dec 8, 2017

Copy link
Copy Markdown

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

@kevinsmithwebdev-zz

Copy link
Copy Markdown

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

@amrdraz

amrdraz commented Jan 9, 2018

Copy link
Copy Markdown

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

`https://egghead.io/api/v1/series/${series_name}`

Example: https://egghead.io/api/v1/series/advanced-react-component-patterns

You should get something like this

{
  "id":166,
  "duration":4306,
  "title":"Advanced React Component Patterns",
  "slug":"advanced-react-component-patterns",
  "state":"published",
  ...,
  "lessons_url":"https://egghead.io/api/v1/series/advanced-react-component-patterns/lessons",
  "download_url":"https://egghead.io/api/v1/series/advanced-react-component-patterns/download?key=[token_is_here]",
  ...
  }

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

@Leyart

Leyart commented May 15, 2018

Copy link
Copy Markdown

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

@enderim

enderim commented Jun 19, 2018

Copy link
Copy Markdown

@amrdraz, it works, thanks 👍

@enderim

enderim commented Jun 20, 2018

Copy link
Copy Markdown

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.

https://github.com/eaorak/egghead-downloader

@cuylerstuwe

cuylerstuwe commented Jul 2, 2018

Copy link
Copy Markdown

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:

https://gist.github.com/salembeats/4044adc4eeb708b25c705444e45dc55b

@goldnetonline

Copy link
Copy Markdown

I use this to get the video links, August 2018

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

@cumibulat

Copy link
Copy Markdown

@goldnetonline how to use your script ?

@Akshay090

Akshay090 commented Oct 8, 2018

Copy link
Copy Markdown

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

@Gyvastis

Gyvastis commented Oct 8, 2018

Copy link
Copy Markdown

Should this suppose to work for premium content as well?

@a-eid

a-eid commented Oct 26, 2018

Copy link
Copy Markdown

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

@peebeebee

Copy link
Copy Markdown

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

@ijasxyz

ijasxyz commented Apr 1, 2019

Copy link
Copy Markdown

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

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

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

@saeedafroozi

Copy link
Copy Markdown

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

@ashleyconnor

Copy link
Copy Markdown

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=...."

@rofrol

rofrol commented Feb 4, 2021

Copy link
Copy Markdown

@bchenSyd

Copy link
Copy Markdown

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