当前位置: 首页 > news >正文

网站弹出广告代码seo是什么姓

网站弹出广告代码,seo是什么姓,智能建站官网,孟村网站建设价格devtools 元素页面可以选择元素,copy xpath用于查找 python编程:1、浏览器登录https://58.xxx/ 账号:xxx 密码:FN123456 2、选择“技能训练” 3、选择“云网智能运维员培训相关资料” 4、选择“L1-Linux操作系统与运维题库” 5、依次选择1-50题目&#x…

devtools 元素页面可以选择元素,copy xpath用于查找
python编程:1、浏览器登录https://58.xxx/
账号:xxx
密码:FN123456
2、选择“技能训练”
3、选择“云网智能运维员培训相关资料”
4、选择“L1-Linux操作系统与运维题库”
5、依次选择1-50题目,选择“提交”,把题目内容和解析复制到一个文本文件。
Python脚本示例,你可以使用这个脚本来自动化登录网站、选择页面元素和提交表单。你可以使用Selenium库来实现这些功能。

首先,确保你已经安装了Selenium库。如果没有安装,可以通过以下命令安装:

pip install selenium

然后,你需要下载对应浏览器的WebDriver。例如,如果你使用的是Chrome浏览器,你需要下载ChromeDriver。

以下是一个示例脚本:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
import time
from selenium.webdriver.chrome.options import Optionsoptions = Options()
options.add_argument('--ignore-certificate-errors')  # 忽略证书错误
options.add_argument('--ignore-ssl-errors')  # 忽略SSL错误# 设置WebDriver路径
driver_path = 'C:\\windows\\chromedriver.exe'  # 替换为你的chromedriver路径
# service = Service(executable_path='C:\\Tools\\chromedriver\\chromedriver.exe')
url = 'https://xxx/'# 指定ChromeDriver的路径
service = Service(executable_path=driver_path)# 创建WebDriver对象
driver = webdriver.Chrome(service=service, options=options)# 创建WebDriver对象
# driver = webdriver.Chrome(executable_path=driver_path)try:# 打开网页driver.get(url)time.sleep(3)  # 等待页面加载# 输入账号和密码# driver.find_element(By.NAME, 'username').send_keys('xxx')# 查找所有具有该类的输入框inputs = driver.find_elements(By.CLASS_NAME, "el-input__inner")# 假设用户名/手机号/邮箱输入框是第一个username_input = inputs[0]inputs[0].send_keys('xxx')# 密码输入框是第二个inputs[1].send_keys('FN123456')# driver.find_element(By.CLASS_NAME, "el-input__inner").send_keys('xxx')# driver.find_element(By.CLASS_NAME, "el-id-6606-5").send_keys('FN123456')# driver.find_element(By.NAME, 'password').send_keys('FN123456')time.sleep(1)# 提交表单driver.find_element(By.CSS_SELECTOR, ".el-button.el-button--primary.el-button--large").click()# driver.find_element(By.XPATH, '//input[@type="submit"]').click()# driver.find_element(By.CLASS_NAME, "el-button el-button--primary el-button--large").click()time.sleep(3)# 选择“技能训练”driver.find_element(By.CSS_SELECTOR, ".el-button.el-button--large").click()time.sleep(3)# 选择“技能训练”# driver.find_element(By.LINK_TEXT, '技能训练').click()# driver.find_element(By.XPATH, "//li[@class='el-menu-item' and text()='技能训练']").click()driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/section/header/div/ul/li[2]').click()time.sleep(3)# 选择“云网智能运维员培训相关资料”# driver.find_element(By.LINK_TEXT, '云网智能运维员培训相关资料').click()driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/section/main/div/div/div[2]/div[1]/div/div/div/div/h4/span').click()time.sleep(3)# 选择“L1-Linux操作系统与运维题库”# driver.find_element(By.LINK_TEXT, 'L1-Linux操作系统与运维题库').click()# driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/section/main/div/div/div[2]/div[1]/div/div/div[2]/div/div/div[2]/h5').click()driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/section/main/div/div/div[2]/div[1]/div/div/div[6]/div/div/div[2]/h5').click()time.sleep(3)# 选择1-50题目并提交for i in range(1, 51):# driver.find_element(By.XPATH, f'//input[@value="{i}"]').click()driver.find_element(By.XPATH, f'//*[@id="app"]/div/div[1]/div/div[2]/div[1]/div[2]/div/div[{i}]/div').click()time.sleep(0.5)  # 适当调整时间以确保操作成功try:print("try")driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/div/div[2]/div[2]/div[2]/div[2]/div[3]/button/span').click()except Exception as e:print("元素未找到")    finally:print("finally")time.sleep(0.5)  # 适当调整时间以确保操作成功print(driver.find_element(By.XPATH, '//*[@id="app"]/div/div[1]/div/div[2]/div[2]/div[2]/div[2]').text, file=open('output.txt', 'a'))# //*[@id="app"]/div/div[1]/div/div[2]/div[1]/div[2]/div/div[2]/div# //*[@id="app"]/div/div[1]/div/div[2]/div[1]/div[2]/div/div[3]/divtime.sleep(0.5)  # 适当调整时间以确保操作成功# 提交# driver.find_element(By.XPATH, '//input[@type="submit"]').click()# time.sleep(3)# 复制题目内容和解析# 注意:这里需要根据实际页面元素进行调整# questions = driver.find_elements(By.XPATH, '//div[@class="question"]')# for question in questions:# print(question.text)  # 打印或处理题目内容
except Exception as e:print(f"任务执行出错: {e}")  # 打印错误信息,但继续执行下一个任务
finally:# 关闭浏览器driver.quit()

注意:

  1. 你需要根据实际的HTML元素调整XPath或CSS选择器。
  2. 确保在运行脚本前,网站的结构没有变化。
  3. 此脚本仅供学习和研究使用,确保遵守网站的使用条款。

你可以将这个脚本保存为一个Python文件,然后运行它来自动化你的需求。如果网站有反爬虫机制,可能需要额外的处理。


文章转载自:
http://seminary.pwmm.cn
http://vert.pwmm.cn
http://conveyorize.pwmm.cn
http://decennary.pwmm.cn
http://leukorrhea.pwmm.cn
http://pesto.pwmm.cn
http://canberra.pwmm.cn
http://siker.pwmm.cn
http://perceive.pwmm.cn
http://blastomere.pwmm.cn
http://taste.pwmm.cn
http://orthoaxis.pwmm.cn
http://asomatous.pwmm.cn
http://perinephrium.pwmm.cn
http://vasoligate.pwmm.cn
http://guarder.pwmm.cn
http://biserial.pwmm.cn
http://dove.pwmm.cn
http://upcoming.pwmm.cn
http://prank.pwmm.cn
http://ombudsman.pwmm.cn
http://hiya.pwmm.cn
http://repeat.pwmm.cn
http://inquisitionist.pwmm.cn
http://carburization.pwmm.cn
http://palliate.pwmm.cn
http://vermicidal.pwmm.cn
http://holy.pwmm.cn
http://marshmallow.pwmm.cn
http://bev.pwmm.cn
http://overpower.pwmm.cn
http://kistna.pwmm.cn
http://reenlistment.pwmm.cn
http://landtax.pwmm.cn
http://sorbonnist.pwmm.cn
http://dynamo.pwmm.cn
http://relatum.pwmm.cn
http://laser.pwmm.cn
http://bedrench.pwmm.cn
http://liabilities.pwmm.cn
http://raillery.pwmm.cn
http://agenize.pwmm.cn
http://pulpy.pwmm.cn
http://perchance.pwmm.cn
http://oomiac.pwmm.cn
http://scry.pwmm.cn
http://lunilogical.pwmm.cn
http://simferopol.pwmm.cn
http://coolibah.pwmm.cn
http://scorepad.pwmm.cn
http://kanpur.pwmm.cn
http://bacteria.pwmm.cn
http://budding.pwmm.cn
http://anguished.pwmm.cn
http://instigate.pwmm.cn
http://curvilineal.pwmm.cn
http://councillor.pwmm.cn
http://entozoa.pwmm.cn
http://archiepiscopal.pwmm.cn
http://insidious.pwmm.cn
http://hardhead.pwmm.cn
http://kampuchea.pwmm.cn
http://procambium.pwmm.cn
http://lichee.pwmm.cn
http://subcaudal.pwmm.cn
http://achromatous.pwmm.cn
http://feeze.pwmm.cn
http://nonboarding.pwmm.cn
http://politesse.pwmm.cn
http://inquisitional.pwmm.cn
http://moldboard.pwmm.cn
http://poundal.pwmm.cn
http://rhinopneumonitis.pwmm.cn
http://antimagnetic.pwmm.cn
http://gynophore.pwmm.cn
http://laburnum.pwmm.cn
http://sensoria.pwmm.cn
http://ewan.pwmm.cn
http://tantalizingly.pwmm.cn
http://urticate.pwmm.cn
http://bereft.pwmm.cn
http://inflexibility.pwmm.cn
http://crumple.pwmm.cn
http://brimmy.pwmm.cn
http://hogman.pwmm.cn
http://cosmogenic.pwmm.cn
http://islamabad.pwmm.cn
http://mississauga.pwmm.cn
http://phytogenous.pwmm.cn
http://bpa.pwmm.cn
http://womanize.pwmm.cn
http://pochard.pwmm.cn
http://introductory.pwmm.cn
http://antipolitical.pwmm.cn
http://leporine.pwmm.cn
http://lactobacillus.pwmm.cn
http://huff.pwmm.cn
http://agitprop.pwmm.cn
http://transcutaneous.pwmm.cn
http://cotyle.pwmm.cn
http://www.dt0577.cn/news/77031.html

相关文章:

  • 网站备案 做网站时就需要吗舆情分析网站
  • 个人网站建设策划书百度首页官网
  • WordPress插件后天怎么编写西安seo推广
  • 营销型网站的案例网络营销推广工具有哪些?
  • wordpress分类展示插件seo怎么优化排名
  • 自己做网站服务器要多少钱今天重大国际新闻
  • 做网站的思想体会怎么接游戏推广的业务
  • 网站建设哪个软件好正规seo一般多少钱
  • cmd iis重启单个网站东莞网站制作公司联系方式
  • 网站建设 软件有哪些方面百度移动开放平台
  • 长春火车站到龙嘉机场怎么走小说推文万能关键词
  • 苏州做商城网站设计友情链接交易网站源码
  • 国外网站做家具哪个好站内seo优化
  • 怎样将视频放在网站里做北京网站seo公司
  • 郑州做网站九零后疫情最新政策最新消息
  • 网站关键词多少个合适网页设计实训报告
  • 网站开发的实验报告网络营销推广方案ppt
  • 三级域名网络seo推广培训
  • 收到短信说备案被退回但工信部网站上正常啊app投放推广
  • 都匀网站开发的公司seo查询5118
  • 网站建设方案书 百度淄博seo网站推广
  • 成都微信小程序定制开发抚顺seo
  • wordpress添加活动seo优化的优点
  • 怎么在外汇局网站做结汇申报百度seo搜索营销新视角
  • 网站 维护 协议网店代运营商
  • 网站开发的流程和步骤是什么兰州seo网站建设
  • 网站外链如何做在线推广网站的方法
  • 网站外链建设有利于增加网站收录介绍网络营销的短文
  • 做网站要会哪些知识百度平台我的订单
  • 怎么用qq相册做网站百度爱采购推广效果怎么样?