Created
November 1, 2014 05:24
-
-
Save leroix/7110a788d74710f3c4d3 to your computer and use it in GitHub Desktop.
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 characters
#! /bin/bash | |
# e.g. ./nova http://www.novamov.com/video/f2b75513d834f | |
# opens a browser and presents a url for the flv file | |
curl $1 \ | |
| grep "flashvars\.\(domain\|file\|filekey\)" \ | |
| tr -d '\n' \ | |
| perl -pe 's/.*flashvars\.domain="(.*)";.*flashvars\.file="(.*)";.*flashvars\.filekey="(\S+)";/$1\/api\/player\.api\.php\?file=$2&key=$3/' \ | |
| xargs open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment