from urllib.request import urlretrieve # #下载网络文件到本地
import os
os.chdir("C:/Users/RankFan/Desktop/空间计量经济学")
for i in range(4, 6):
url = f‘http://www.mysmu.edu/faculty/zlyang/ECON6002_21-Web/Chap{i}-2021T2.pdf‘
print(url)
name = url.split(‘/‘)[-1]
print(name)
urlretrieve(url, filename=name)