bs4.BeautifulSoup.get

BeautifulSoup.get(key, default=None)

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