手机
当前位置:查字典教程网 >脚本专栏 >python >python的urllib模块显示下载进度示例
python的urllib模块显示下载进度示例
摘要:复制代码代码如下:defreport_hook(count,block_size,total_size):...print'%02d%%'%...

复制代码 代码如下:

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%

...

【python的urllib模块显示下载进度示例】相关文章:

python模拟登陆Tom邮箱示例分享

python ElementTree 基本读操作示例

python使用urllib2模块获取gravatar头像实例

Python tempfile模块学习笔记(临时文件)

python解析xml模块封装代码

python 合并文件的具体实例

python使用urllib模块开发的多线程豆瓣小站mp3下载器

python在多玩图片上下载妹子图的实现代码

python的id()函数解密过程

python字符串替换示例

精品推荐
分类导航