import urllib.requestimport re##def downback(a,b,c):## ''''## a:已经下载的数据块## b:数据块的大小## c:远程文件的大小## '''## per = 100.0 * a * b / c## if per > 100 :## per = 100## print('%.2f%%' % per)stock_CodeUrl = 'http://quote.eastmoney.com/stocklist.html'#获取股票代码列表def urlTolist(url): allCodeList = [] html = urllib.request.urlopen(url).read() html = html.decode('gbk') s = r'