[问题] Selenium找到标签里的标签

楼主: EijiHoba (我要好工作)   2023-07-20 10:20:10
<article id="albumlist-content">
<ul class="albumlist-photo-list">
<li class="albumlist-photo-item">
<a class="albumlist-photo-thumb" href="/photo/s770187/18555098">
<img rc="https://photo.abcde.net/s770187/1b145d3/18555098/1022075897_Q.jpg">
</a>
<a class="albumlist-photo-name" href="/photo/s770187/18555098">美女</a>
<time>2014-08-04</time>
<p>共305张</p>
</li>
我想找到<p>共305张</p>这个标签取得相簿张数
没有ID 没有Name 没有 CSS Class
请问各位遇到这种情况如何找到
作者: tzouandy2818 (Naked Bear)   2023-07-20 15:46:00
.albumlist-photo-item > time + p
作者: LincolnBoy   2023-07-20 21:11:00
google
作者: goitaly (机会不等人)   2023-07-20 21:55:00
drivet.find_element(by=By.TAG_NAME, value='p').get_attribute('innerHTML')

Links booklink

Contact Us: admin [ a t ] ucptt.com