Python爬取图片实例
摘要:使用网页中图片的具体地址下载并保存图片,保存时判断文件是否存在 #定义一个函数参数为图片的地址,以及文件名 def picture (url ,str1): root = '你的存储地址' #图片的存储地址 path = root + str1 + '.jpg' #图片的地址以及名称 try: if
阅读全文
posted @ 2021-02-28 21:30
posted @ 2021-02-28 21:30
posted @ 2021-02-27 16:35