import requests # 原文:https://blog.csdn.net/z564359805/article/details/81978913 arr = ["https://img.yzcdn.cn/upload_files/2018/01/02/FiF5PVWUnEa7WvY9XrZ7sTS0oos_.jpg!large.jpg", "https://img.yzcdn.cn/upload_files/2018/01/02/FkWnmjXC0SW5Wnxpu-k5oqOyGTxE.jpg!large.jpg", "https://img.yzcdn.cn/upload_files/2017/08/30/150407378283543361.jpg!large.jpg", "https://img.yzcdn.cn/upload_files/2017/08/30/150407378330677125.jpg!large.jpg", "https://img.yzcdn.cn/upload_files/2017/08/30/150407378404625301.jpg!large.jpg"] i=0 for inx, val in enumerate(arr): html = requests.get(val) with open("C:/data/"+str(inx)+".jpg","wb")as f: f.write(html.content)