import requests url = 'https://www.baidu.com/img/bd_logo1.png' r = requests.get(url=url) with open('bd_logo1.png', 'wb') as f: f.write(r.content) print('OK')
需要添加引用命名空间 using System.IO; using System.IO.IsolatedStorage; 1.将图片保存到独立存储空间 using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { if (myIsolatedStorage.FileExists(App.fileName)) { myIsolatedStorage.DeleteF