<>更改为&lt; 和&gt; 在python中使用beautifulsoup解析html

fly*_*lee 6 html python parsing beautifulsoup

在使用Beautifulsoup处理html时,<和>被转换为&lt;&gt;,因为标签锚都被转换,整个汤失去了它的结构,任何建议?

rkd*_*day 6

设置formatter=None可能会有所帮助(http://www.crummy.com/software/BeautifulSoup/bs4/doc/#output-formatters),但这可能表明您的 HTML 无效。

如果这不起作用,您能否提供一些重现该问题的示例代码和 HTML?