[問題] Selenium找到標籤裡的標籤

看板Python作者 (我要好工作)時間9月前 (2023/07/20 10:20), 編輯推噓1(103)
留言4則, 3人參與, 9月前最新討論串1/2 (看更多)
<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="" rel="nofollow">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 請問各位遇到這種情況如何找到 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.229.180.64 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1689819614.A.353.html

07/20 15:46, 9月前 , 1F
.albumlist-photo-item > time + p
07/20 15:46, 1F

07/20 21:11, 9月前 , 2F
google
07/20 21:11, 2F

07/20 21:55, 9月前 , 3F
drivet.find_element(by=By.TAG_NAME, value='p').get_at
07/20 21:55, 3F

07/20 21:55, 9月前 , 4F
tribute('innerHTML')
07/20 21:55, 4F
文章代碼(AID): #1ak9dUDJ (Python)
文章代碼(AID): #1ak9dUDJ (Python)