Merge PR #1077: Fix bs4 deprecation warning (text -> string)

This commit is contained in:
unclecode
2026-02-01 07:04:31 +00:00

View File

@@ -665,7 +665,7 @@ class PruningContentFilter(RelevantContentFilter):
def _remove_comments(self, soup):
"""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()
def _remove_unwanted_tags(self, soup):