I tried to download something from the Internet using Python, I am using urllib.retriever from the urllib module but I just can’t get it work. I would like to be able to save the downloaded file to a location of my choice.
If someone could explain to me how to do it with clear examples, that would be VERY appreciated.
I tried to download something from the Internet using Python, I am using urllib.retriever
Share
I suggest using urllib2 like so:
You could even shorten it to (although, you wouldnt want to shorten it if you plan to enclose each individual call in a
try–except):