网络图片下载:基于 Python 和 requests 库

import requests
img_url = 'https://tse2-mm.cn.bing.net/th/id/OIP-C.L1dkkkGwQlojnyNi42SCNQHaE8?w=239&h=180&c=7&r=0&o=5&dpr=2&pid=1.7'
re = requests.post(img_url)
img_file = open('car.jpg','wb')
img_file.write(re.content)

注意:此方法仅适用于图片权限为免费的网站。

py 文件大小:383B