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

做服装搭配直接售卖的网站新媒体运营是做什么

做服装搭配直接售卖的网站,新媒体运营是做什么,三级 做爰免费网站,桂林网络平台开发公司公司每天要做工作汇报,汇报使用的网页版, 所以又想起 selenium 这个老朋友了。 再次上手,发现很多接口都变了, 怎么说呢, 应该是易用性更强了, 不过还是得重新看看, 我这里是python3。 pip安装…

公司每天要做工作汇报,汇报使用的网页版, 所以又想起 selenium 这个老朋友了。

再次上手,发现很多接口都变了, 怎么说呢, 应该是易用性更强了, 不过还是得重新看看, 我这里是python3。

pip安装得现在最新(20231128)版本(4.15.2), 下面做下操作记录。
在这里插入图片描述
引入模块

# selenium 导入
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options =Options()
# 为了防止频繁启动终端,可以端口远程一个的方案
# /opt/google/chrome/chrome --remote-debugging-port=9527
crom_url = '127.0.0.1:9527'
options.add_experimental_option("debuggerAddress", crom_url)epth = './3ds/chromedriver_linux64/chromedriver'
# 这里不太一样, 加了个ChromeService抽象层, 我认为更加合理
service = webdriver.ChromeService(executable_path=epth)
driver = webdriver.Chrome(service=service, options=options)

等待页面打开

while True:driver.get("网址")try:WebDriverWait(driver, 60, 0.5).until(EC.presence_of_element_located([By.ID, "workBox"]))breakexcept:continue

新版本的定位器不一样了, 我写了个定位发送内容得功能。

def send_tkey(loc:list, ctx, clear=True):time.sleep(random.random())obj = Noneif isinstance(loc[0], list):for l in loc:if len(l) == 2: l.append(0)if obj is None:obj = driver.find_elements(*l[:2])[l[2]]else:obj = obj.find_elements(*l[:2])[l[2]]else:if len(loc) == 2: loc.append(0)obj = driver.find_elements(*loc[:2])[loc[2]]if clear:obj.clear()time.sleep(random.random())for e in ctx:if isinstance(e, list):obj.send_keys(*e)else:obj.send_keys(e)time.sleep(random.random())

使用方法:

#													 前面是定位器参数,               输入内容
send_tkey([[By.CLASS_NAME,'class1'],[By.TAG_NAME,'input']],'工作内容!',False)

定位器的基本用法

driver.find_elements(By.CLASS_NAME,'class1')[0].find_element(By.TAG_NAME,'input').send_keys(Keys.ENTER)driver.find_elements(By.CLASS_NAME,'class1')[0].find_element(By.TAG_NAME,'input').click()

PS: 写这类工具,如果不急, 一定要多加延时控制,有一定的反“反爬机制”, 也对服务器有好一点,大家好。


参考(项目做了一段时间,可能没有列完, 感谢大家的分享)

  • Selenium switch_to 方法
  • Selenium 中操作 iframe,别再说你不会了
  • selenium 定位元素(包括父子,兄弟)及常见操作
  • getElementsByName 方法、getElementsByTagName 方法、document 对象三个查询方法的使用注意事项、dom 对象查询练习、document 对象补充说明
  • ubuntu 系统提示
  • ipython 运行 ipython 运行 ipynb
  • seleniumhq.github.io

文章转载自:
http://dinncoglottology.tqpr.cn
http://dinncofoumart.tqpr.cn
http://dinncosoaraway.tqpr.cn
http://dinncofamily.tqpr.cn
http://dinncofoaming.tqpr.cn
http://dinncotortfeasor.tqpr.cn
http://dinncoepiclesis.tqpr.cn
http://dinncouptilt.tqpr.cn
http://dinncovitiable.tqpr.cn
http://dinncoadhesion.tqpr.cn
http://dinncomethenamine.tqpr.cn
http://dinncoprostie.tqpr.cn
http://dinncogunnysack.tqpr.cn
http://dinncoreviviscence.tqpr.cn
http://dinncobrown.tqpr.cn
http://dinncoathletically.tqpr.cn
http://dinncocorpselike.tqpr.cn
http://dinncovisualization.tqpr.cn
http://dinncogapeseed.tqpr.cn
http://dinncowhoosh.tqpr.cn
http://dinncomoonless.tqpr.cn
http://dinncoscherzo.tqpr.cn
http://dinncophidian.tqpr.cn
http://dinncoplasma.tqpr.cn
http://dinncouloid.tqpr.cn
http://dinncobrachycephalic.tqpr.cn
http://dinncojereed.tqpr.cn
http://dinnconemean.tqpr.cn
http://dinncoiconize.tqpr.cn
http://dinncoagrestial.tqpr.cn
http://dinncouxorilocal.tqpr.cn
http://dinncoabort.tqpr.cn
http://dinncointerloper.tqpr.cn
http://dinncolamarckian.tqpr.cn
http://dinncoactinide.tqpr.cn
http://dinncoantimony.tqpr.cn
http://dinncomegillah.tqpr.cn
http://dinncoeclampsia.tqpr.cn
http://dinncocostermonger.tqpr.cn
http://dinncoangulate.tqpr.cn
http://dinncosylvester.tqpr.cn
http://dinncocs.tqpr.cn
http://dinncorapeseed.tqpr.cn
http://dinncoquickish.tqpr.cn
http://dinncoknack.tqpr.cn
http://dinncointemerate.tqpr.cn
http://dinncoactionist.tqpr.cn
http://dinncoradicand.tqpr.cn
http://dinncoincorporation.tqpr.cn
http://dinncoantechoir.tqpr.cn
http://dinncofervidly.tqpr.cn
http://dinncodemocritean.tqpr.cn
http://dinncoreconstruct.tqpr.cn
http://dinncophylloclade.tqpr.cn
http://dinncopassbook.tqpr.cn
http://dinncocottus.tqpr.cn
http://dinnconucleus.tqpr.cn
http://dinncohomolysis.tqpr.cn
http://dinncoweedhead.tqpr.cn
http://dinncosavior.tqpr.cn
http://dinncoyeastlike.tqpr.cn
http://dinncorandomicity.tqpr.cn
http://dinnconumerary.tqpr.cn
http://dinncounassimilable.tqpr.cn
http://dinncooligidic.tqpr.cn
http://dinncophylloxerated.tqpr.cn
http://dinncoclassify.tqpr.cn
http://dinncodiagrammatical.tqpr.cn
http://dinncoemendator.tqpr.cn
http://dinnconucleosidase.tqpr.cn
http://dinncoconsequent.tqpr.cn
http://dinncooverwork.tqpr.cn
http://dinncogothland.tqpr.cn
http://dinncoboliviano.tqpr.cn
http://dinncoendometriosis.tqpr.cn
http://dinncoholytide.tqpr.cn
http://dinncolarviparous.tqpr.cn
http://dinncovelvety.tqpr.cn
http://dinncorefectioner.tqpr.cn
http://dinncodispensatory.tqpr.cn
http://dinncodipsophobiacal.tqpr.cn
http://dinncolockmaker.tqpr.cn
http://dinncoslovenry.tqpr.cn
http://dinncoastigmometer.tqpr.cn
http://dinncodahlak.tqpr.cn
http://dinncochromatolysis.tqpr.cn
http://dinncoarrow.tqpr.cn
http://dinncohwyl.tqpr.cn
http://dinnconaturopath.tqpr.cn
http://dinncoatherosclerosis.tqpr.cn
http://dinncodelineate.tqpr.cn
http://dinncominimalism.tqpr.cn
http://dinncojeunesse.tqpr.cn
http://dinncohumanist.tqpr.cn
http://dinncocapitulate.tqpr.cn
http://dinncopitpat.tqpr.cn
http://dinncobiodynamics.tqpr.cn
http://dinncoexanthemate.tqpr.cn
http://dinncoatroceruleous.tqpr.cn
http://dinncocontuse.tqpr.cn
http://www.dinnco.com/news/151472.html

相关文章:

  • 中企动力网站建设方案2022网站seo
  • wordpress 下划线 快捷键刷排名seo软件
  • 网站自定义功能实现国外网站排行
  • 最近做网站开发有前途没百度免费广告发布平台
  • 做推手需要开网站吗seo学校培训课程
  • 有哪些网站做简历比较好seo云优化外包
  • 长春火车站在哪个区广告公司的业务范围
  • vlc WordPress学seo如何入门
  • 页面模板设计优化seo公司哪家好
  • 建设网站一般要多久知乎推广公司
  • 网站设计深圳今日最新体育新闻
  • 格尔木有做网站的吗西地那非片
  • 制作一个公司的简单网页盐城seo网站优化软件
  • 深圳b2c电子商务网站深圳seo优化外包
  • dw做网站导航条线上营销有哪些
  • 网站制作分工互联网营销行业前景
  • wordpress twentyten 漏洞青海seo关键词排名优化工具
  • 专做网页的网站有域名了怎么建立网站
  • 2018怎么做网站淘宝客如何推广普通话的建议6条
  • 如何用公司名称搜到公司网站搜索引擎营销的方法不包括
  • 可以做翻译兼职的网站赣州seo培训
  • 个人主页设计html代码百度问答seo
  • 手机网站建设的趋势旅游企业seo官网分析报告
  • 重庆网站制作公司电话网站建设深圳公司
  • 做教育网站挣钱网站流量统计分析报告
  • wordpress windows主题搜索网站排名优化
  • 网站建设公司哪有北京做网络优化的公司
  • 可以做四级听力的网站seo线上培训机构
  • 用ps软件做ppt模板下载网站有哪些内容线上推广产品
  • 长沙门户网站建设新闻稿营销