【Python】批量下载图片
""" -*- coding:utf-8 -*- @Time :2020/9/4 17:58 @Version:1.0 """ import requests def download(img_url, path, img_name): pic = requests.get(img_url, verify=False) fb = open(path + img_name, 'wb') fb.write(pic.content) if __name__ == '__main__': url = 'https://img9.doubanio.com/view/photo/thumb/public/p917023389.jpg' path = './' img_name = '图片.jpg' download(url, path, img_name)
如果忍耐算是坚强 我选择抵抗 如果妥协算是努力 我选择争取