如何使用 BeautifulSoup 获取覆盖 h3 的 class 中的元素

How to get element in class covered h3 by using BeautifulSoup

我想使用 BeautifulSoup 获取元素 "Orange"。 我只需要一个覆盖 h2 的元素。 请帮助如何获得它?

<h2 class="heading">
<a><span class="name">Orange</span></a>
</h2>

from bs4 import BeautifulSoup

html = """<h2 class="heading">
<a><span class="name">Orange</span></a>
</h2>"""

soup = BeautifulSoup(html, 'html.parser')

for item in soup.findAll("span", {'class': 'name'}):
    print(item.text)