diff options
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r-- | bs4/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py index 98ac57b..786b57b 100644 --- a/bs4/__init__.py +++ b/bs4/__init__.py @@ -193,9 +193,9 @@ class BeautifulSoup(Tag): self.tagStack = [] self.pushTag(self) - def new_tag(self, name, **attrs): + def new_tag(self, name, namespace=None, **attrs): """Create a new tag associated with this soup.""" - return Tag(None, self.builder, name, attrs) + return Tag(None, self.builder, name, namespace, attrs) def new_string(self, s): """Create a new NavigableString associated with this soup.""" @@ -272,7 +272,7 @@ class BeautifulSoup(Tag): mostRecentTag = self.popTag() return mostRecentTag - def handle_starttag(self, name, attrs): + def handle_starttag(self, name, namespace, attrs): """Push a start tag on to the stack. If this method returns None, the tag was rejected by the @@ -289,7 +289,7 @@ class BeautifulSoup(Tag): or not self.parse_only.search_tag(name, attrs))): return None - tag = Tag(self, self.builder, name, attrs, self.currentTag, + tag = Tag(self, self.builder, name, namespace, attrs, self.currentTag, self.previous_element) if tag is None: return tag |