Código Python:
Ver original- import urllib 
- import os 
- from BeautifulSoup import BeautifulSoup 
-   
- url = raw_input('URL -> ') 
-   
- f = urllib.urlopen(url) 
- data = f.read() 
- f.close() 
-   
- soup = BeautifulSoup(data) 
- for counter, img in enumerate(soup.findAll('img')): 
-     if img['src'].startswith("http://"): 
-         ipath = img['src'] 
-     else: 
-         ipath = url + img['src'] 
-   
-     try: 
-         local = open(img['src'].split("/")[-1]), "wb") 
-         internet = urllib.urlopen(ipath) 
-     except IOError: 
-         continue 
-   
-     data = internet.read() 
-     local.write(data) 
-   
-     internet.close() 
-     local.close() 
Mas o menos quedaría así.