import urllib.request
headers = {
‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36’
}
startpage = int(input(‘请输入起始页(大于0):’))
end_page = int(input(‘请输入结尾页(小于等于116):’))
for i in range(start_page,end_page+1):
url = f’https://www.1ppt.com/moban/ppt_moban{i}.html’
response = urllib.request.urlopen(url)
with open(f’C:/Users/Victor/Desktop/PPT模板第{i}页.html’,‘wb’)as f :
f.write(response.read())
print(f’已保存PPT模板第{i}页’)
