"Using Python to Grab Images From a Web Site" was posted by ThinkingSerious and received 2 users commented
btruelove said,         
May 2 2008

Overkill IMO. A less trivial example is going to get large and messy quickly. What about when the XML file in on an FTP, or requires authentication, needs some cookie, has to filter downloads by file size, wants to use a proxy, spawn multiple processes and so on? A more apt tool is curl or wget (I’m lazy so I used both). Also, when you keep it at the shell it’s more natural to pull in other shell commands when needed.

curl -s http://99designs.com/contests/6999/feed | grep -Po “src=\”.*(png|jpg)” | grep -o “http.*” | xargs wget -q

ThinkingSerious said,         
May 2 2008

Great example. Thanks for your contribution.

Welcome, please leave your comments below

  Username (required)

  Email (required)

  Website

Leave your comments below

Subscribe to this topic via Comment Rss or TrackBack

about

This blog provides programming, design, business and productivity content for tech entrepreneurs living in a 2.0 world.

Find out more about the author here.

categories

members