Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从此 div 获取日期:
<div class="pandatacontcol" style=" width:160px;"> <h6>Date Qualified</h6> <p id="QualDate34868684">2013-03-08 12:04:01</p> </div>
所以输出将是:2013-03-08
2013-03-08
我试图这样做:
elements = doc.select("p[id^=\"QualDate\"]");
但它不起作用。
不带引号试试
doc.select("p[id^=QualDate]");
属性的值设置在引号内<tag attribute="value">,但这些引号不是值的一部分。
<tag attribute="value">