def _download_http(self, url, dest_file):
    res = requests.get(url, stream=True)
    max_file_bytes = int(res.headers['Content-Length'])
    chunk_size = ((1024 * 1024) * 4)
    downloaded_size = 0
    f = open(dest_file, 'wb')
    for data in res.iter_content(chunk_size):
        downloaded_size += len(data)
        percent = ((downloaded_size / max_file_bytes) * 100)
        self._showDownloadProgress(dest_file, percent)
        f.write(data)
    f.close()
def _download_http(self, url, dest_file):
    res = requests.get(url, stream=True)
    max_file_bytes = int(res.headers['Content-Length'])
    chunk_size = ((1024 * 1024) * 4)
    downloaded_size = 0
    f = open(dest_file, 'wb')
    for data in res.iter_content(chunk_size):
        downloaded_size += len(data)
        percent = ((downloaded_size / max_file_bytes) * 100)
        self._showDownloadProgress(dest_file, percent)
        f.write(data)
    f.close()