diff options
author | Leonard Richardson <leonardr@segfault.org> | 2015-06-28 15:58:48 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2015-06-28 15:58:48 -0400 |
commit | 007aa56a1922eea9f364bf3b73e72077046e2c69 (patch) | |
tree | 709684c6357fc69013c5d39b026b1d303da9a40b /bs4/builder/_htmlparser.py | |
parent | 9428b9d6ed0d279a72414a986290821ca4f0caaf (diff) |
It's now possible to pickle a BeautifulSoup object no matter which
tree builder was used to create it. However, the only tree builder
that survives the pickling process is the HTMLParserTreeBuilder
('html.parser'). If you unpickle a BeautifulSoup object created with
some other tree builder, soup.builder will be None. [bug=1231545]
Diffstat (limited to 'bs4/builder/_htmlparser.py')
-rw-r--r-- | bs4/builder/_htmlparser.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bs4/builder/_htmlparser.py b/bs4/builder/_htmlparser.py index 25811f1..0101d64 100644 --- a/bs4/builder/_htmlparser.py +++ b/bs4/builder/_htmlparser.py @@ -127,6 +127,7 @@ class BeautifulSoupHTMLParser(HTMLParser): class HTMLParserTreeBuilder(HTMLTreeBuilder): is_xml = False + picklable = True NAME = HTMLPARSER features = [NAME, HTML, STRICT] |