How to extract html table by using Beautifulsoup
问题 Taking the below html snippet as example: >>>soup <table> <tr><td class="abc">This is ABC</td> </tr> <tr><td class="firstdata"> data1_xxx </td> </tr> </table> <table> <tr><td class="efg">This is EFG</td> </tr> <tr><td class="firstdata"> data1_xxx </td> </tr> </table> If I can only find my desire table by its table data class, >>>soup.findAll("td",{"class":"abc"}) [<td class="abc">This is ABC</td>] how can I extract the whole table as below? <table> <tr><td class="abc">This is ABC</td> </tr>