Download from a website : Web Page « Network « Python
- Python
- Network
- Web Page
Download from a website

# Download Example
import urllib, sys
f = urllib.urlopen("http://www.java2s.com")
while 1:
buf = f.read(2048)
if not len(buf):
break
sys.stdout.write(buf)
Related examples in the same category