Python's urllib.request.urlretrieve() accepts a function that will be called when each chunk is fetched from the network.
The function is called with three arguments: a progressive identifier of the chunk, its size and the total size of the download.
Given those three information can I compute the number of bytes already fetched? This will be used to compute the progress of the download.
I'm tempted to do chunk_number * chunk_size / download_size
, but I'm not sure the chunk size is constant for all the chunks.