随笔分类 - Python
摘要:通过python 来实现这样一个简单的爬虫功能,把我们想要的图片爬取到本地。 下面使用python来实现这样一个功能。 # -*- coding: utf-8 -*-""" 爬取图片 """import urllibimport reimport timeimport os# 显示下载进度def s
阅读全文
摘要:案例1: # coding=utf-8import requests# 以get方法发送请求,返回数据response = requests.get('http://www.baidu.com')# 以二进制写入的方式打开一个文件f = open('index.html', 'wb')# 将响应的字
阅读全文

浙公网安备 33010602011771号