diff options
| author | ha shao <mozbugbox@yahoo.com.au> | 2017-07-28 18:11:02 +0800 |
|---|---|---|
| committer | ha shao <mozbugbox@yahoo.com.au> | 2017-07-28 18:11:02 +0800 |
| commit | d2be1b2a8c7fe662534dd1b6e3adf4ef9c0f322f (patch) | |
| tree | fa0fea4cdd1eb63190fc3d519e135abb38e46b18 /src/lxml/html | |
| parent | 6d226ca75d0565d64e01567a01eb627ecc694b45 (diff) | |
| download | python-lxml-d2be1b2a8c7fe662534dd1b6e3adf4ef9c0f322f.tar.gz | |
Soupparser: Fix "No parser was explicitly specified" warning
Seems that beautifulsoup won't handle using list as `features`
properly.
Diffstat (limited to 'src/lxml/html')
| -rw-r--r-- | src/lxml/html/soupparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lxml/html/soupparser.py b/src/lxml/html/soupparser.py index 11fd2754..44756aa6 100644 --- a/src/lxml/html/soupparser.py +++ b/src/lxml/html/soupparser.py @@ -74,7 +74,7 @@ def _parse(source, beautifulsoup, makeelement, **bsargs): bsargs['convertEntities'] = 'html' if hasattr(beautifulsoup, "DEFAULT_BUILDER_FEATURES"): # bs4 if 'features' not in bsargs: - bsargs['features'] = ['html.parser'] # use Python html parser + bsargs['features'] = 'html.parser' # use Python html parser tree = beautifulsoup(source, **bsargs) root = _convert_tree(tree, makeelement) # from ET: wrap the document in a html root element, if necessary |
