How to parse malformed HTML in python, using standard libraries

后端 未结 6 730
不知归路
不知归路 2020-12-08 04:36

There are so many html and xml libraries built into python, that it\'s hard to believe there\'s no support for real-world HTML parsing.

I\'ve found plenty of great t

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 05:05

    Your choices are to change your requirements or to duplicate all of the work done by the developers of third party modules.

    Beautiful soup consists of a single python file with about 2000 lines of code, if that is too big of a dependency, then go ahead and write your own, it won't work as well and probably won't be a whole lot smaller.

提交回复
热议问题