import base64 import string import time from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from config.ConfigMap import Config from captcha.chaojiying import Chaojiying_Client from db.YPool import OPMysql import pyautogui opm = OPMysql() if __name__ == '__main__': wd = webdriver.Chrome(service=Service(r'E:\pachong\chromedriver.exe')) wd.get('......网页登录地址........') wd.maximize_window() time.sleep(2) # 登录流程 usernameEle = wd.find_element(By.XPATH, '.....') usernameEle.send_keys("........") verifyCodeEle = wd.find_element(By.XPATH, '.....') verifyCodeEle.send_keys(".........") time.sleep(10) loginEle = wd.find_element(By.XPATH, '..........') loginEle.click() time.sleep(5) # 进入需要爬虫的页面 ele = wd.find_element(By.XPATH, '.....') ele.c
Python爬虫小程序
最新推荐文章于 2024-10-06 22:47:19 发布
这篇博客演示了如何利用Python的Selenium库自动登录网页,并进入特定页面抓取带有详细信息的表格数据。通过识别和点击详情按钮,获取弹窗显示的详细内容,并使用pyautogui进行屏幕点击操作。
摘要由CSDN通过智能技术生成