解决问题:AttributeError: ‘_io.BufferedWriter‘ object has no attribute ‘wirte‘


```python
import urllib.request

response = urllib.request.urlopen("http://placekitten.com/g/500/600")
cat_img = response.read()

with open("cat_500_600.jpg","wb") as f:
    f.wirte(cat_img)

是我太憨憨了,居然吧write写成wirte了

import urllib.request

response = urllib.request.urlopen("http://placekitten.com/g/500/600")
cat_img = response.read()

with open("cat_500_600.jpg","wb") as f:
    f.write(cat_img)


posted @ 2020-05-13 17:34  MrFugui  阅读(112)  评论(0编辑  收藏  举报