Quicktime

From Jon's Wiki
Revision as of 00:09, 29 December 2010 by Johnno (talk | contribs)

Apple are a shower of bastards who don't want you to download their trailers. Here's a shell script to do it anyway:

#!/bin/sh

APPLEBULLSHIT='QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)'
URL=$1
TMPFILE="/tmp/yoinktrailer-`date +%Y%m%d-%H%M%S`"
wget -U "$APPLEBULLSHIT" -q -O $TMPFILE $URL

TRAILER=`strings $TMPFILE|grep '.mov$'|head -1`
TRAILERURL="`dirname $URL`/$TRAILER"
wget -U "$APPLEBULLSHIT" -O $TRAILER $TRAILERURL \
    && touch $TRAILER && rm $TMPFILE
yoink http://movies.apple.com/movies/independent/capitalismalovestory/capitalismalovestory-tlr1_1080p.mov

Right-click and copy the link URL from Apple trailers.