只获取广东这条信息,但是第二行在其他页面中可能就变成第三行了,求问怎么获取<td class="op_trust_tdRight">广东</td>
<table width="100%;">
<tr>
<td class="op_trust_tdLeft">执行法院:</td>
<td class="op_trust_tdRight">福田区人民法院</td>
</tr>
<tr>
<td class="op_trust_tdLeft">省份:</td>
<td class="op_trust_tdRight">广东</td>
</tr>
<tr>
<td class="op_trust_tdLeft">案号:</td>
<td class="op_trust_tdRight">(2011)深福法执字第01854号</td>
</tr>
var table=document.getElementsByTagName("table");
var targetVal=table[0].rows[1].cells[1];
One way is to find the cell in the province and then extract the data of the adjacent cells. I use pyquery to parse html. If you have written front-end jquery, you should be familiar with it.