Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adoussot/f6fbf2a8a424a35a4a6e4253257d961b to your computer and use it in GitHub Desktop.
Save adoussot/f6fbf2a8a424a35a4a6e4253257d961b 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 -o '%(autonumber)s_%(title)s.%(ext)s'

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

  • store it in a file "rename.py"
  • execute it with python rename.py
#!/usr/bin/python3
# coding: utf-8

import os 
import re
import glob

def rename_medias(name):
	return re.sub("([^a-zA-Z0-9-_*.])", "-", name).lstrip('-')

def list_folders():
	for i in glob.glob('*.mp4'):
		os.rename(i, rename_medias(i))

if __name__ == "__main__":
	list_folders()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment