Skip to content

Instantly share code, notes, and snippets.

@lsimone
Created October 22, 2017 21:19

Revisions

  1. lsimone revised this gist Oct 22, 2017. No changes.
  2. lsimone created this gist Oct 22, 2017.
    15 changes: 15 additions & 0 deletions egghead courses download
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash

    list=`lynx -source $1 | grep -o -e 'https[^"]*.m3u8' | xargs`
    course="${1##*/}"
    mkdir $course

    echo ">>> $(echo $list | wc -w) video(s) found"

    c=1
    for video in $list
    do
    echo ">>> DOWNLOADING: $( printf "%02d" $c ) - $video"
    youtube-dl $video -o "$course/$( printf "%02d" $c ) - %(title)s.%(ext)s"
    let c+=1
    done