测试url:http://tieba.baidu.com/p/27141123322?pn=begin 1end 4复制代码 代码如下:import string ,urllib2 def baidu_tieba(url,begin_page,end_page): for i in range(begin_page, end_page+1): sName = string.zfill(i,5)+ ‘.html’ print ‘正在下载第’ + str(i) + ‘个网页,并将其存储为’ + sName + ‘..........’ f = open (