![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
文章平均质量分 83
lucky_chaichai
爱学习的仙女,都是一些基础知识随笔、总结哦,good good study,day day up~噢耶
展开
-
爬虫实践——selenium、bs4
目录一、浏览器的一般设置二、打开网页并获取网页源码的方式三、HTML解析1、BeautifulSoup2、Selenium的webdriver加入触发动作四、反爬虫操作from selenium import webdriverfrom selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesimport urllib.parseimport urllib.requestfrom bs4 import Bea原创 2022-06-22 17:05:32 · 354 阅读 · 0 评论 -
模拟windows键盘、鼠标等操作模块:pywin32
以下操作可以模拟对鼠标键盘的一系列顺序操作。1、 将内容复制到剪切板:# 将字符串text复制到剪切板win32clipboard.OpenClipboard()win32clipboard.EmptyClipboard()win32clipboard.SetClipboardText('text')win32clipboard.CloseClipboard()2、 鼠标定位当前页面位置win32api.SetCursorPos([200,370]) #数值[水平位置,垂直位置]3、原创 2021-01-21 13:39:12 · 4582 阅读 · 7 评论 -
爬虫中的“句柄无效”错误和selenium.common.exceptions.ElementClickInterceptedException
1.使用selenium爬虫报错:OSError: [WinError 6] 句柄无效原因:多次爬虫后没有成功关闭chromedriver.exe,导致后台含有多个chromedriver.exe 进程。解决: 爬虫程序结束后使用driver.quit()2.使用selenium爬虫时,find到的元素在click时报错:selenium.common.exceptions.ElementClickInterceptedException具体错误信息:selenium.common.excepti原创 2020-12-30 17:07:39 · 804 阅读 · 6 评论