Thursday, January 31, 2008

Download High Quality Movie Trailers

XML parsing is often left to programming languages, not for command line use or in shell scripts. Here I used XMLStarlet Command Line XML Toolkit a wonderful set of tools that brings power of handling XML to commandline and Wget to download the content. The xmlstarlet tool seeks the URL’s in XML feed and passes it to wget.

/usr/bin/wget -c  `/usr/bin/xmlstarlet sel  --net  -D -T -t  -m "/records/movieinfo/preview" -v  "large" -o " "` 

These two programs are ported and available for other operating systems. The wget “-c” (continue) is optional. You can use any other downloader instead of wget. I suggest curl

No comments:

Post a Comment

You can leave a comment here using your Google account, OpenID or as an anonymous user.

Popular Posts