MCPcopy Create free account
hub / github.com/clips/pattern / findPreviousSibling

Method findPreviousSibling

pattern/web/soup/BeautifulSoup.py:306–310  ·  view source on GitHub ↗

Returns the closest sibling to this Tag that matches the given criteria and appears before this Tag in the document.

(self, name=None, attrs={}, text=None, **kwargs)

Source from the content-addressed store, hash-verified

304 fetchPrevious = findAllPrevious # Compatibility with pre-3.x
305
306 def findPreviousSibling(self, name=None, attrs={}, text=None, **kwargs):
307 """Returns the closest sibling to this Tag that matches the
308 given criteria and appears before this Tag in the document."""
309 return self._findOne(self.findPreviousSiblings, name, attrs, text,
310 **kwargs)
311
312 def findPreviousSiblings(self, name=None, attrs={}, text=None,
313 limit=None, **kwargs):

Callers 1

testPreviousSiblingMethod · 0.80

Calls 1

_findOneMethod · 0.95

Tested by 1

testPreviousSiblingMethod · 0.64