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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user