我想得到href
价值来自<a>
《Splinter》中的元素。
有没有相关的api方法?
如果您使用find_by_* 方法 http://splinter.cobrateam.info/docs/api/driver-and-element-api.html#splinter.driver.DriverAPI.find_by_css,这些返回的实例是ElementLists http://splinter.cobrateam.info/docs/api/element-list.html#splinter.element_list.ElementList。选择您感兴趣的元素后(很可能是ElementAPI http://splinter.cobrateam.info/docs/api/driver-and-element-api.html#splinter.driver.ElementAPI实例),像字典一样访问属性:
the_element['href']
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)