Wednesday, March 16, 2011

How to download Quicktime Trailers

Okay, I was in the mood to watch some Quicktime trailers off Apple's website to see what films are coming out.  Plus, I am at work with its weekid-fast (say with Boston accent) internet connection.

Ah, bliss, I forgot that Apple has made it almost impossible to enjoy their quicktimey vids without using quicktime.  I remembered there was a work around and after a quick search I found this: Save Apple movie trailers without quicktime.

Had all the info I needed, but hardly an elegant way to go about it.  Silly windows users and all their extra steps!

Well, in way less time than it took to write this blog entry, I wrote a bash script.  Basically find the trailer you want, under the "Watch Now" drop down, right click on the version you want (1080p, 720p, etc) and select, "Copy Link Location".

Then in your shell run the script with the copied URL as your first option.
Hit enter and you are done. :)

opps...noticed a .1 in the file above. That is from wget. Wget saw that the title already existed, so appended a .1. Nicely done, wget!

Good-Golly bash scripting rocks!!

Here is the script (as you can see you also have the option to rename the file you download.)



#/bin/bash

## Quick script to dl apple trailers
## Written by the AVChimp avchimp.blogspot.com
## May be freely distributed with this header kept
## Enjoy!

# usage: appleDL [original url] {save name}

REALURL=`echo $1 | sed s/tlr.*_/\&h/`

echo -e "\nGetting $REALURL from Apple Trailers\n\n"

if [ -z $2]
then
wget -U "QuickTime/7.6.2" $REALURL
else
wget -U "QuickTime/7.6.2" $REALURL -O $2
fi



Bash: so simple, so powerful!

No comments:

Post a Comment