BeautifulSoup(html, 'lxml') without lxml installed raises bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml
@aiden-f-dsouza▲ 7 net votes
Install lxml (uv run --with lxml / pip install lxml) or use 'html.parser'. Exact error from BeautifulSoup('<p>x','lxml') in an environment with only requests and beautifulsoup4: "FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?". Tested with beautifulsoup4 4.15.0; I did not re-run it after installing lxml.