爬虫
风吹起的蒲公英
目前主要研究SSD、闪存、LSM-TREE
展开
-
beautifulsoup 安装和作用
beautifulsoup 安装和作用pip安装pip install beautifulsoup4beautifulsoup使用解析器有三种:lxml、html.parser、html5lib,除了lxml,另外两种都是自带的。pip install lxml作用主要作用:在爬取过程中快速帮我们定位到元素并提取数据...原创 2021-01-23 21:14:54 · 160 阅读 · 0 评论 -
requests功能
requests功能使用GET和POST发送请求(1)使用requests发送get请求将百度搜索的页面源码爬回来,返回的是百度搜索页面的HTML源码。>>> import requests >>> r = requests.get("https://www.baidu.com") #像百度发送请求并返回一个对象>>> r = r.text #获取文本对象>>> print(r) #打印结果(2)用post的方法向h原创 2021-01-23 20:22:08 · 280 阅读 · 0 评论 -
安装requests库
安装requests库用pip 安装pip install requests用github源码安装git clone git://github.com/requests/requests.gitcd requestspython setup.py install若出现一下问题ModuleNotFoundError: No module named 'setuptools'则运行sudo apt-get install python-setuptools python3-se原创 2021-01-20 17:42:40 · 136 阅读 · 0 评论