下载图片:requests.get+open('name.jpg','wb')

import requests
res = requests.get('https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1566615795256&di=5ae6a5503daefac279ecf2e9242c3e69&imgtype=0&src=http%3A%2F%2Fpic30.nipic.com%2F20130619%2F9885883_210838271000_2.jpg')
pic = res.content

photo = open('niao.jpg','wb')
photo.write(pic)
photo.close()

你可能感兴趣的:(语法)