我正在尝试抓取页面,并且想要获取未隐藏的div ...我正在使用nokogiri进行抓取。
status = doc.css('.fi-mu__m').map {|status| status.css('.fi-mu__score-info').css('.fi-s__status--abbr').css('.period .full_time').map(&:text)}
除了.period
和.full_time
之外,我还需要其他东西
这是DOM部分的副本:
<div class="fi-s__status--abbr">
<span class="period cancelled hidden">
Annulé
</span>
<span class="period lineups hidden">
Comp.
</span>
<span class="period half_time hidden">
MT
</span>
<span class="period extra_time hidden">
Fin 2ème MT
</span>
<span class="period extra_half_time hidden">
End 1H ET
</span>
<span class="period penalty_shootout hidden">
TAB
</span>
<span class="period full_time">
Fin
</span>
<span class="period post_match hidden">
Fin
</span>
<span class="period minute hidden">0'</span>
</div>