
爬虫
本栏记录一些爬虫心得
reachHigher
To hedge or to speculate, that's a question!
展开
-
Python selenium调用Chrome driver更改文件默认下载位置
在爬虫的时候会遇到下载文件的情况,这时候如果用Chrome浏览器点击下载,文件会自动存放到默认文件夹,一般是 我的电脑>下载 这个路径,如果我们想下载到指定文件夹,有没有办法呢?,可以试试下面的方法,在启动driver的时候就指定一个默认下载路径from selenium import webdriveroptions = webdriver.ChromeOptions()out_path = r'D:\Projects\Spiders' # 是你想指定的路径prefs = {'profi原创 2020-05-26 11:29:56 · 11004 阅读 · 7 评论 -
Python使用selenium和百度AI开放平台识别验证码自动登录
文章目录本文内容工具准备Python Packages浏览器驱动参考本文内容本文将介绍如何使用selenium的webdriver来自动输入账户、密码,以及通过 百度通用文字识别 来识别验证码信息,输入并识别结果并点击登录。工具准备本文使用的是 Python 3.6 语言Python Packages需要安装的包有:seleniumurllibjsonbase64# 安装方式, e.g.pip install selenium浏览器驱动本文使用 chrome driver,原创 2020-05-25 21:20:43 · 1709 阅读 · 2 评论 -
scrapy startproject xxx 报错, ImportError: DLL load failed: 操作系统无法运行 %1
from cryptography.hazmat.bindings._openssl import ffi, libImportError: DLL load failed: 操作系统无法运行 %1。解决方法:只需安装一个包 cryptography ,打开cmd,输入pip install -I cryptography...原创 2018-11-04 03:48:26 · 2845 阅读 · 4 评论