You can find the next element using findNext()
.
from bs4 import BeautifulSoup
html = """
<div class="badge memberType Member long notAffiliatedContact">Lead</div>
<div class="name"><a href="/10016/John Doe">John Doe</a></div>
<div class="posted"><span class="label">Email: </span><span class="value break-word">[email protected]</span></div>
"""
soup = BeautifulSoup(html, 'html.parser')
divs = soup.findAll("div", {"class": "badge"})
for div in divs:
if div.text == "Lead":
name = div.findNext('div')
email = name.findNext('span').findNext('span')
print(name.text, email.text)
#John Doe [email protected]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…