Retrieving binary files using urllib

In  python text(binary) files as image or video files can be transferred using the urllib.
The pattern is to open the URL and use read to download the entire contents of the document 
into a string variable (img) then write that information to a local file.
Posted on by