Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dylwylie/c52182c87297961b0e8d to your computer and use it in GitHub Desktop.
Save dylwylie/c52182c87297961b0e8d 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

  4. Run this rename script to get rid of the Mojibake and number them based on file creation date.

COUNTER=0
ls -rt *mp4 | while IFS= read -r file; do
           COUNTER=$((COUNTER + 1))
           PADDED=$(printf "%02d" $COUNTER)
           mv "$file" "`echo $PADDED. $file | sed "s/#.*//"`"'.mp4';
done
@dab
Copy link

dab commented Feb 26, 2016

Thanks for sharing, but can't get it working cause error:

youtube-dl https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree
[generic] javascript-redux-the-single-immutable-state-tree: Requesting header
WARNING: Falling back on generic information extractor.
[generic] javascript-redux-the-single-immutable-state-tree: Downloading webpage
[generic] javascript-redux-the-single-immutable-state-tree: Extracting information
[Wistia] k41wmxv1eg: Downloading JSON metadata
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/__init__.py", line 411, in main
    _real_main(argv)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/__init__.py", line 401, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1692, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 677, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 734, in process_ie_result
    extra_info=extra_info, download=False, process=False)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 666, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 316, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python3.5/site-packages/youtube_dl/extractor/wistia.py", line 38, in _real_extract
    for atype, a in data['assets'].items():
AttributeError: 'list' object has no attribute 'items'

Do you know how I can run over it?

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