Created
February 7, 2013 16:07
Revisions
-
shirishp created this gist
Feb 7, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #! /bin/bash # Author: Shirish Padalkar (https://twitter.com/_Garbage_) if [ "$#" -ne 1 ]; then echo "Usage: $0 infoq_presentation_url" exit 1 fi url_with_spaces=`curl -A "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10" $1 | grep "<source src=" | tr -dc "[:print:]"` url=${url_with_spaces//<source src=/} echo "You can download this video from ${url// \/>/}"