Downloading files from an http server in python

Posted by cellular on Stack Overflow See other posts from Stack Overflow or by cellular
Published on 2011-01-03T23:06:47Z Indexed on 2011/01/04 0:54 UTC
Read the original article Hit count: 127

Filed under:
|

Using urllib2, we can get the http response from a web server. If that server simply holds a list of files, we could parse through the files and download each individually. However, I'm not sure what the easiest, most pythonic way to parse through the files would be.

When you get a whole http response of the generic file server list, through urllib2's urlopen() method, how can we neatly download each file?

© Stack Overflow or respective owner

Related posts about python

Related posts about automation