fix bs4 warning on text kwarg - switch to string

Fix warning as proposed by bs4:
```
  .../bs4/element.py:2253: DeprecationWarning: The 'text' argument to find()-type methods is deprecated. Use 'string' instead.
    return self.find_all(
```
This commit is contained in:
RoyLeviLangware
2025-05-06 11:44:48 +03:00
committed by GitHub
parent 9b5ccac76e
commit 9a0585c8f6

View File

@@ -656,7 +656,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):