diff options
author | Leonard Richardson <leonardr@segfault.org> | 2018-12-24 09:54:10 -0500 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2018-12-24 09:54:10 -0500 |
commit | 50ded6dbdfeba182233fff86eb98513e09fcde93 (patch) | |
tree | 5f05f605ac955b91b00d47d6c022c01fc0327d3b /bs4/builder/__init__.py | |
parent | d065751cdab7877feeffbd0f798819ef77a2aa66 (diff) |
Keep track of the namespace abbreviations found while parsing the document. This makes select() work most of the time without requiring a value for 'namespaces'.
Diffstat (limited to 'bs4/builder/__init__.py')
-rw-r--r-- | bs4/builder/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py index c9e3f3d..610d42f 100644 --- a/bs4/builder/__init__.py +++ b/bs4/builder/__init__.py @@ -102,6 +102,12 @@ class TreeBuilder(object): def __init__(self): self.soup = None + def initialize_soup(self, soup): + """The BeautifulSoup object has been initialized and is now + being associated with the TreeBuilder. + """ + self.soup = soup + def reset(self): pass |