user1295679
user1295679

Reputation: 43

Python urllib.urlretrieve Exception Handling

Download the file to half, or because of network problems cause an error or a timeout when downloading this to do with them?

Upvotes: 0

Views: 1037

Answers (1)

shiva
shiva

Reputation: 2770

As in Python Docs

Changed in version 2.5: urlretrieve() will raise ContentTooShortError when it detects that the amount of data available was less than the expected amount (which is the size reported by a Content-Length header). This can occur, for example, when the download is interrupted.

Upvotes: 1

Related Questions