html5lib

Don't put html, head and body tags automatically, beautifulsoup

Don't put html, head and body tags automatically, beautifulsoup Question: I’m using beautifulsoup with html5lib, it puts the html, head and body tags automatically: BeautifulSoup(‘<h1>FOO</h1>’, ‘html5lib’) # => <html><head></head><body><h1>FOO</h1></body></html> Is there any option that I can set, turn off this behavior ? Asked By: Bengineer || Source Answers: You may have misunderstood BeautifulSoup here. BeautifulSoup …

Total answers: 9