summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2015-06-25 21:27:49 -0400
committerLeonard Richardson <leonardr@segfault.org>2015-06-25 21:27:49 -0400
commit51044d613cc782d883a6eb3cd0d3dc391e13c23b (patch)
tree3f832763747aef89ac6e12503e538ebb047747f0 /bs4/element.py
parent89a4bcc0e1053ff75cd22e6dba8edc8eff387385 (diff)
The text argument to the find_* methods is now called string,
which is more accurate. text still works, but is the argument described in the documentation. text may eventually change its meaning, but not for a very long time. [bug=1366856]
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bs4/element.py b/bs4/element.py
index 95b6735..454d34b 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -1,3 +1,4 @@
+from pdb import set_trace
import collections
import re
import sys
@@ -498,6 +499,10 @@ class PageElement(object):
def _find_all(self, name, attrs, text, limit, generator, **kwargs):
"Iterates over a generator looking for things that match."
+ if text is None and 'string' in kwargs:
+ text = kwargs['string']
+ del kwargs['string']
+
if isinstance(name, SoupStrainer):
strainer = name
else: