python的urllib模块显示下载进度示例
来源:
中文源码网 浏览:178 次 日期:2024-04-25 22:26:16
【下载文档: python的urllib模块显示下载进度示例.txt 】
python的urllib模块显示下载进度示例
复制代码 代码如下: def report_hook(count, block_size, total_size):... print '%02d%%'%(100.0 * count * block_size/ total_size)... urllib.urlretrieve("http://sports.sina.com.cn/", reporthook= report_hook)00%01%03%...