> Pretty straight forward...but what I'm finding is if the
> url is pointing to a file that is not there, the server
> returns a file that's a web page displaying a 404 error.
>
> Anyone have any recommendations for handling this?
You're right, that is NOT documented in a way that's easy to find
I'm building an app that needs to download a file from the
web.
I'm trying to make sure I catch any issues with the download
but I've run into a problem.
here's what I have so far:
try:
urllib.urlretrieve(url,filename)
print "File: ", filename, " downloaded"
except IOError:
print