MCPcopy
hub / github.com/csev/py4e / get

Method get

code3/bs4/element.py:943–947  ·  view source on GitHub ↗

Returns the value of the 'key' attribute for the tag, or the value given for 'default' if it doesn't have that attribute.

(self, key, default=None)

Source from the content-addressed store, hash-verified

941 raise ValueError("Tag.index: element not in tag")
942
943 def get(self, key, default=None):
944 """Returns the value of the 'key' attribute for the tag, or
945 the value given for 'default' if it doesn't have that
946 attribute."""
947 return self.attrs.get(key, default)
948
949 def has_attr(self, key):
950 return key in self.attrs

Callers 15

input_fileMethod · 0.45
_open_unicode_fileMethod · 0.45
foundation.min.jsFile · 0.45
foundation.jsFile · 0.45
foundation.min.jsFile · 0.45
fFunction · 0.45
jquery-ui.min.jsFile · 0.45
jquery.min.jsFile · 0.45
mbFunction · 0.45
JbFunction · 0.45
VbFunction · 0.45
gFunction · 0.45

Calls

no outgoing calls

Tested by 1

id_matches_nameMethod · 0.36