import urllib.request
url_prefix = 'http://nptel.ac.in/courses/111103021/'
for i in range(1,42):
url = url_prefix + str(i)
print("downloading page " + str(i))
urllib.request.urlretrieve(url, str(i) + ".pdf")//第二个参数表示存储文件名字
batch downloading file in python
最新推荐文章于 2024-06-28 08:01:56 发布