Does BeautifulSoup find_all() preserve tag order?

前端 未结 1 720
情话喂你
情话喂你 2020-12-11 17:58

I wish to use BeautifulSoup to parse some HMTL. I have a table with several rows. I\'m trying to find a row that meets certain conditions (certain attribute values) and use

相关标签:
1条回答
  • 2020-12-11 18:20

    It is my experience that find_all does preserve order. However to make sure you can use the find_all_next method which uses the find_next method which will preserve the order. Here is a link to the documentation.

    0 讨论(0)
提交回复
热议问题