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

Method find

pattern/web/soup/BeautifulSoup.py:824–832  ·  view source on GitHub ↗

Return only the first child of this Tag matching the given criteria.

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

Source from the content-addressed store, hash-verified

822 #Soup methods
823
824 def find(self, name=None, attrs={}, recursive=True, text=None,
825 **kwargs):
826 """Return only the first child of this Tag matching the given
827 criteria."""
828 r = None
829 l = self.findAll(name, attrs, recursive, text, 1, **kwargs)
830 if l:
831 r = l[0]
832 return r
833 findChild = find
834
835 def findAll(self, name=None, attrs={}, recursive=True, text=None,

Callers 15

__getattr__Method · 0.95
firstTextMethod · 0.95
testTagReplacementMethod · 0.95
parse_declarationMethod · 0.45
testFindallByClassMethod · 0.45
testFindByIndexMethod · 0.45
testNextMethod · 0.45
testPreviousMethod · 0.45
testNextSiblingMethod · 0.45
testPreviousSiblingMethod · 0.45
testTextNavigationMethod · 0.45

Calls 1

findAllMethod · 0.95

Tested by 15

testTagReplacementMethod · 0.76
testFindallByClassMethod · 0.36
testFindByIndexMethod · 0.36
testNextMethod · 0.36
testPreviousMethod · 0.36
testNextSiblingMethod · 0.36
testPreviousSiblingMethod · 0.36
testTextNavigationMethod · 0.36
testSiblingsMethod · 0.36
testAppendMethod · 0.36
testTagExtractionMethod · 0.36