爬虫常用库安装

urllib  re库 一般自带,如图测试是否正常

爬虫常用库安装

requests

命令行: pip install requests

安装完成测试是否正常,如图

爬虫常用库安装

selenium

命令行: pip install selenium

安装完成

爬虫常用库安装

缺少chromeDriver

ChromeDriver官网得*,镜像链接 : http://npm.taobao.org/mirrors/chromedriver/

chromeDriver 2.39  对应chrome版本 67,如果版本对应不对,会报错

下载好之后,把.exe文件放入到配置好环境变量的文件下,如 python36下

爬虫常用库安装

配置成功会弹出浏览器。

输入: driver.get('http//:www.baidu.com'),页面会变成百度

phanyomjs

下载地址:http://phantomjs.org/download.html

把phantomjs.exe 所在目录 配置到环境变量里

爬虫常用库安装

lxml

命令行:pip install lxml

beautifulsoup

命令行:pip install beautifulsoup4

pyquery

命令行:pip install pyquery

爬虫常用库安装

pymsql (python3)

命令行:pip install pymsql

pymongo

命令行:pip install pymongo

爬虫常用库安装

redis

命令行:pip install redis

爬虫常用库安装

flask

命令行:pip install flask

django

命令行:pip install django

jupyter

命令行:pip install jupyter

安装成功  输入 jupyter notebook,弹出浏览器