Best library to parse HTML with Python 3 and example?

前端 未结 6 1594
轮回少年
轮回少年 2020-12-24 12:50

I\'m new to Python completely and am using Python 3.1 on Windows (pywin). I need to parse some HTML, to essentially extra values between specific HTML tags and am confused a

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-24 13:44

    BeautifulSoup, with its version 3.1.0.1 (January 2009) also work with Python 3.x.

    I do not have have direct experience with BeautifulSoup under Py3k (although this soon should change...).   I just read, however, that Version 3.1.0 of Beautiful Soup does significantly worse on real-world HTML than its previous versions, so I may try and wait if possible (i.e. stay with Python 2.6 a bit longer).

提交回复
热议问题