bs4.BeautifulSoup.findParents

BeautifulSoup.findParents(name=None, attrs={}, limit=None, **kwargs)

Returns the parents of this Tag that match the given criteria.