(python) the difference children and descendent in Beautiful.

If you have the next

<table>
  <tr> </tr>
 <tr> </tr>
 <tr> </tr>
 <tr> </tr>

   <table>
    <td></td>
    <td></td>
   </table>

</table>

If you call

bsobj.find("table").children

you can find only tr tags
but if you call descendants
you can find td tags

댓글

이 블로그의 인기 게시물

(Garbage Collection) Old Area의 Concurrent Mark-sweep 알고리즘

(데이터베이스) HAVING절과 WHERE 절의 차이

(Pytorch) DataLoder 클래스