import requests url = 'https://upload-images.jianshu.io/upload_images/13614258-ba7bc15bccab5c63.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240' resp = requests.get(url) with open('C:\\Users\\del\\Desktop\\新建文件夹\\1.png','wb') as f: f.write(resp.content)
执行结果: