Code import requests url = "https://www.chaoxing.com/images/logo.png" r = requests.get(url) print(r.url) print(r.content) with open("E://download/png11.png","wb") as f: f.write(r.content) 如图所示: 很神奇,第二天再次做,完全复制代码。居然可以啦!? 解决办法:重启IDE