Merge PR #1077: Fix bs4 deprecation warning (text -> string)
This commit is contained in:
@@ -665,7 +665,7 @@ class PruningContentFilter(RelevantContentFilter):
|
|||||||
|
|
||||||
def _remove_comments(self, soup):
|
def _remove_comments(self, soup):
|
||||||
"""Removes HTML comments"""
|
"""Removes HTML comments"""
|
||||||
for element in soup(text=lambda text: isinstance(text, Comment)):
|
for element in soup(string=lambda string: isinstance(string, Comment)):
|
||||||
element.extract()
|
element.extract()
|
||||||
|
|
||||||
def _remove_unwanted_tags(self, soup):
|
def _remove_unwanted_tags(self, soup):
|
||||||
|
|||||||
Reference in New Issue
Block a user