标签:
#coding: utf-8 #title..href... import urllib.request import time url=[‘‘]*230 page=15564 j=0 while j<230: url[j]=‘http://www.chinacampus.org/show.php?contentid=‘+str(page) content=urllib.request.urlopen(url[j]).read().decode(‘utf-8‘, ‘replace‘) open(r‘stu/‘+str(page)+‘.html‘,‘w+‘,encoding=‘utf-8‘).write(content) print(‘donwloading ‘,j,‘ page:‘,url[j]) j=j+1 page=page+1 time.sleep(5) else: print(‘download article finished‘)
标签:
原文地址:http://www.cnblogs.com/x113/p/4401109.html