【发布时间】:2020-05-19 03:17:03
【问题描述】:
我正在尝试从该站点 https://brokercheck.finra.org/search/genericsearch/list 的搜索结果中抓取所有 CRD#
(单击链接时需要重新搜索,只需为Individual 搜索输入一些随机内容)
我正在使用driver.find_elements_by_xpath 来定位每个结果页面上的所有 CRD 编号。但是,我已经玩了一段时间的路径,但 webdriver 仍然无法从站点中获取 CRD。
我目前有(在 Python 中)
crds = driver.find_elements_by_xpath("//md-list-item/div/div/div/div/div/bc-bio-geo-section/div/div/div/div/div/span")
但结果总是空的。
【问题讨论】:
-
他们有相似的跨度类 spacerright ng-binding。 driver.find_elements_by_xpath("//span[@class= 'spacerright ng-binding']"));然后循环打印 .getText() 也许?
标签: python selenium xpath css-selectors webdriverwait