Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 0.22 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/env python
  2. import urllib
  3. count = 1000
  4. x = 1
  5. while x <= count:
  6.         i = str(x)
  7.         link = "http://static1.robohash.com/" + i
  8.         file = "./downloads/"+ i +".jpg"
  9.         urllib.urlretrieve(link,file)
  10.         print "Downloading : "+link
  11.         x += 1