The warning issued when an HTML parser is used to parse
XML that is not (as far as we can tell) XHTML.
◆ MESSAGE
| str bs4._warnings.XMLParsedAsHTMLWarning.MESSAGE |
|
static |
Initial value:= """It looks like you're using an HTML parser to parse an XML document.
Assuming this really is an XML document, what you're doing might work, but you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the Python package 'lxml' installed, and pass the keyword argument `features="xml"` into the BeautifulSoup constructor.
If you want or need to use an HTML parser on this document, you can make this warning go away by filtering it. To do that, run this code before calling the BeautifulSoup constructor:
from bs4 import XMLParsedAsHTMLWarning
import warnings
warnings.filterwarnings("ignore", category=XMLParsedAsHTMLWarning)
"""
The documentation for this class was generated from the following file:
- docs/help/help-venv/lib/python3.12/site-packages/bs4/_warnings.py