diff options
author | Karl Lorey <git@karllorey.com> | 2022-06-20 22:15:11 +0200 |
---|---|---|
committer | Karl Lorey <git@karllorey.com> | 2022-06-20 22:15:11 +0200 |
commit | e42340f59ac29a13e54c8d0eb2bdf28a290e8cb8 (patch) | |
tree | 3975b3f1dc811fa0a35d350230388929805a5bfe | |
parent | 59ba75e02b3c2b762ce5d735f618752186b79292 (diff) |
Use string= instead of text= for bs4 find_all
-rw-r--r-- | mlscraper/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlscraper/html.py b/mlscraper/html.py index 303791b..98201a9 100644 --- a/mlscraper/html.py +++ b/mlscraper/html.py @@ -50,7 +50,7 @@ class Node: assert isinstance(item, str), "can only search for str at the moment" # text - for soup_node in self.soup.find_all(text=item): + for soup_node in self.soup.find_all(string=item): # use parent node as found text is NaviableString and not Tag node = self._page._get_node_for_soup(soup_node.parent) yield TextMatch(node) |