You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise, BeautifulSoup will issue a warning and pick one for
you, but the parser it chooses may be different on different
machines.
...it's mentioned that it's recommended to specify a parser, but looking at BeautifulSoup's documentation, the connection between the features and how the parser is specified is not evident because the BS doc never uses the features keyword, rather just tosses it in as the second argument:
(https://beautiful-soup-4.readthedocs.io/en/latest/#differences-between-parsers)
BS4's documentation also doesn't include an API reference that would list the different parameters, it only provides a high-level intro.
I would recommend modifying the MechanicalSoup docs to explain the parser setting more explicitly, like how BS4 does it in code:
:param features: Desirable features of the parser to be
used. This may be the name of a specific parser ("lxml",
"lxml-xml", "html.parser", or "html5lib") or it may be the
type of markup to be used ("html", "html5", "xml"). It's
recommended that you name a specific parser, so that
Beautiful Soup gives you the same results across platforms
and virtual environments.
The text was updated successfully, but these errors were encountered:
In the following part of the documentation,
MechanicalSoup/mechanicalsoup/stateful_browser.py
Lines 29 to 35 in 16238f4
...it's mentioned that it's recommended to specify a parser, but looking at BeautifulSoup's documentation, the connection between the
features
and how the parser is specified is not evident because the BS doc never uses thefeatures
keyword, rather just tosses it in as the second argument:(https://beautiful-soup-4.readthedocs.io/en/latest/#differences-between-parsers)
BS4's documentation also doesn't include an API reference that would list the different parameters, it only provides a high-level intro.
I would recommend modifying the MechanicalSoup docs to explain the parser setting more explicitly, like how BS4 does it in code:
The text was updated successfully, but these errors were encountered: