- 博客(7)
- 收藏
- 关注
原创 Python爬虫-谷歌无可视化反检测
from selenium import webdriver# 实现无可视化界面from selenium.webdriver.chrome.options import Options# 实现规避检测from selenium.webdriver import ChromeOptions# 实现无可视化界面的操作chrome_options = Options()chrome_options.add_argument('--headless')chrome_options.add...
2022-05-20 09:49:45 210
原创 Python爬虫-模拟登入-selenium模块
selenium模块-浏览器自动化1.编写基于浏览器自动化的操作代码- 发起请求:get(url)- 标签定位:find系列的方法- 标签交互:send_keys('xxx')- 执行js程序:excute_script('jsCode')- 前进,后退:back(),forward()- 关闭浏览器:quit()2.selenium处理iframe- 如果定位的标签存在于iframe标签之中,则必须使用switch_to.frame(id)- 动作链(拖动):from ..
2022-05-16 22:04:20 171
原创 Python爬虫练习-Xpath解析批量爬取PPT
批量爬取PPT,分页爬取import osimport requestsfrom lxml import etreeif __name__ == '__main__': # UA伪装 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.70 Safari/537.36'
2022-05-08 18:52:26 625
原创 Python爬虫练习-Xpath解析图片爬取
import osimport requestsfrom lxml import etreeif __name__ == '__main__': # UA伪装 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.70 Safari/537.36' } # 指.
2022-05-08 16:09:25 512
原创 Python-Web开发基础-HTML
CS模式:C/S 就是Client/Server 的缩写,是客户端和服务器架构 BS模式 :B/S 就是Browser/Server的缩写,是浏览器和服务器架构 网页主要由三部分组成: 结构(Structure) ,表现(Presentation) 、行为(Behavior)最简单的web应用程序import socketsock=socket.socket()sock.bind(("127.0.0.1",8888))sock.listen(5)while True: con
2021-12-25 12:45:27 990
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人