Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 3
    It sure took a while, but there, finally is the easy straightforward api I expect from a python stdlib :) Commented Aug 4, 2017 at 20:52
  • Very nice answer for python3, see also docs.python.org/3/library/… Commented Dec 23, 2019 at 10:31
  • @EdouardThiel If you click on urllib.request.urlretrieve above it'll bring you to that exact link. Cheers!
    – bmaupin
    Commented Dec 23, 2019 at 14:44
  • 3
    urllib.request.urlretrieve is documented as a "legacy interface" and "might become deprecated in the future".
    – gerrit
    Commented Mar 27, 2020 at 17:32
  • 1
    You should mention that you are getting a bunch of bytes that need to be handled after that.
    – thoroc
    Commented Jun 14, 2020 at 13:02