1
我做了一個HTML請求,我想從中檢索特定元素,但我不知道如何使用BeautifulSoup4訪問它們。BeautifulSoup4中的訪問值
這裏是返回的HTML的示例:
<td valign="top" >
<span class="recordAttribute" >Taxonomy</span>: Mollusca, Gastropoda, Littorinimorpha, Hydrobiidae, Hydrobia<br>
<span class="recordAttribute" >Identifiers:</span> AF118324[sampleid] <br>
<span class="recordAttribute" >Depository</span>: Mined from GenBank, NCBI
</td>
我想訪問元素AF118324(這是標識符跨度類後的名稱)。
我怎樣才能訪問它? (當然不使用子串方法)
的可能的複製[BeautifulSoup:落後的另一個標籤標籤文本(http://stackoverflow.com/questions/24662053/beautifulsoup-get-tag-text-後面另一個標籤) –