#!/usr/bin/env python
# -*- coding:utf-8 -*-
import urllib
url = "http://www.163.com/"
#html = urllib.urlopen(urllib)
local = "C:\Users\Administrator\Desktop\ruiy.html"
def callback(a,b,c):
down_progress = 100.0 * a *b / c
if down_progress > 100:
down_progress = 100
print("%.2f" % down_progress)
urllib.urlretrieve(url,local,callback)