需要提取两个具有相同名称的html类的内容

我想提取以下html代码的内容

<div class="card__content">
<div class="card__title">
Sajjad Haider Khan
<svg class="icon link__icon" height="10" width="10">
<use xlink:href="#icon-arrow-right">
</use>
</svg>
</div>
<div class="card__position">
Student,
<span class="card__text">
Computer Science Engineering (CSE)
</span>
</div>
<div class="card__position">
<span class="card__text">
Career Interests:
</span>
Computer Science; Python; Machine Learning
</div>
</div>

我需要两个card__position类的所有内容。在第二个card__position类中,在span类关闭之后有一个双引号引起来的文本。我也想提取该文本。

我可以使用以下代码仅提取card__title和仅第一个card__position类的内容。

from bs4 import BeautifulSoup as soup
from urllib.request import urlopen as uReq

url = '<url>'

uClient = uReq(url)
page_html = uClient.read()
uClient.close()
page_soup = soup(page_html, "html.parser")

containers = page_soup.find_all("div", {"class": "card__content"})

container = containers[0]

title = container.findAll("div", {"class": "card__title"})
#print(name[0].text)

position = container.findAll("div", {"class": "card__position"})
#print(position[0].text)

但是,我想按以下方式打印结果:

Sajjad Haider Khan
Student
Computer Science Engineering (CSE)
Career Interests: Computer Science; Python; Machine Learning