[問題] 不曉得xpath要怎麼下
對Xpath還不是很熟 想要請教一下大大
以這個網址為例好了
https://www.ptt.cc/bbs/Boy-Girl/M.1413031277.A.CEE.html
<div class="push">
<span class="hl push-tag">推 </span>
<span class="f3 hl push-userid">m99</span>
<span class="f3 push-content">: 之前男友是鐵匠後來變成船長就...</span>
<span class="push-ipdatetime">10/11 22:22
</span></div>
假設我想要抓 m99這個網友所屬的 <div class ="push">
因為在網頁裡<div class ="push">很多個,我想要全部都把他們找出來
那麼我的Xpath要怎麼下比較好呢?
--
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.218.124
※ 文章網址: http://www.ptt.cc/bbs/Python/M.1413095793.A.FA2.html
※ 編輯: left (140.112.218.124), 10/12/2014 14:39:38
→
10/12 14:51, , 1F
10/12 14:51, 1F

→
10/12 14:55, , 2F
10/12 14:55, 2F
※ 編輯: left (140.112.218.124), 10/12/2014 14:56:33
→
10/12 14:58, , 3F
10/12 14:58, 3F
→
10/12 15:58, , 4F
10/12 15:58, 4F
→
10/12 15:59, , 5F
10/12 15:59, 5F
→
10/12 16:00, , 6F
10/12 16:00, 6F
→
10/12 16:01, , 7F
10/12 16:01, 7F
→
10/12 16:13, , 8F
10/12 16:13, 8F
Python 近期熱門文章
PTT數位生活區 即時熱門文章