
Python爬虫
文章平均质量分 58
is_MuMu
这个作者很懒,什么都没留下…
展开
-
selenium安装以及chromedriver安装与环境配置
目录一、selenium安装二、Chromedriver安装1、查看谷歌版本2、下载chromedriver三、环境配置1、将chromedriver.exe位置到path环境变量实现2、验证Chromedriver是否安装成功一、selenium安装打开pycharm如果在安装selenium出现no such option:--build-dir问题可以看我另一篇博客。Pycharm中pip:no such option: --buil..原创 2022-05-10 11:38:51 · 3112 阅读 · 0 评论 -
Pycharm中pip:no such option: --build-dir
问题:在安装beautifulsoup4时报错原因:pycharm依赖于--build-dir安装第三方库,但是在20.2版本之后就删除了解决方案:更换版本号python -m pip install pip==20.2.4在pycharm终端查看版本号命令pip list...原创 2022-05-02 14:05:18 · 1509 阅读 · 0 评论 -
在pycharm中安装包
1、打开pycharm,点击file,点击setting2、找到Python interpreter,点击pip3、在搜索栏中输入你要安装的包原创 2022-04-26 09:31:21 · 17330 阅读 · 0 评论 -
爬虫学习打卡第四天——requests实战
一、获取百度网页并打印代码如下:import requestsurl='http://www.baidu.com'r=requests.get(url)r.encoding=r.apparent_encoding #改变我们获取页面的编码方式print(r.text)r.encoding=r.apparent_encodingr.encoding:从HTTP header中猜测的内容响应编码方式r.apparent_encoding:从内容中分析出响应的编码方式出..原创 2021-11-18 11:51:56 · 978 阅读 · 1 评论 -
爬虫学习打卡第三天——requests高阶
目录一、SSL验证二、代理设置三、超时设置四、身份验证一、SSL验证SSL (Secure Sockets Layer)安全套接层。是由Netscape公司于1990年开发,用于保障Word Wide Web(WWW)通讯的安全。主要任务是提供私密性,信息完整性和身份认证。第一个栗子:请求12306import requestsr=requests.get('https://www.12306.cn/index/') #请求的网址print(r.statu..原创 2021-11-13 20:14:26 · 3779 阅读 · 0 评论 -
爬虫学习打卡第二天——requests基础
一、模块安装!pip install requests二、requests模块get函数的使用百度为例:import requestsr=requests.get('https://www.baidu.com/') #get请求网址print(type(r)) print(r.status_code)print(type(r.text))print(r.text) #获取百度源码print(r.cookies)..原创 2021-11-12 22:23:12 · 900 阅读 · 0 评论 -
爬虫学习打卡第一天-jupyter安装配置
一、anaconda安装官网下载地址https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/由于我电脑是Windows系统,你可以根据自己电脑的配置选择合适的.exe文件,下载。原创 2021-11-10 15:41:10 · 1167 阅读 · 1 评论