Selenium,得到结果列表,在y中应用x,得到相同结果的列表



谁能检查一下代码并指出我的错误:

不能创建包含所有结果的字典。如果我选中

for i in boxes:
print(i.text)

我得到了我正在寻找的数据列表。如果我想要分割然后我得到相同数量的结果,但是所有结果的值是相同的。例如,我得到20行相同的数据。

url = 'https://www.willhaben.at/iad/immobilien/eigentumswohnung/eigentumswohnung-angebote?sfId=79dc800d-b672-43d4-910f-b5a2dfdb6b1a&isNavigation=true&areaId=900&rows=25&NO_OF_ROOMS_BUCKET=3X3&page=5&ESTATE_SIZE/LIVING_AREA_FROM=65&PRICE_TO=365000'

boxes = driver.find_elements('css selector',
"div[class='Box-sc-wfmb7k-0 jYFQjC']"
)
for item in boxes:
question = {
'title' : driver.find_element('css selector',
"div[class='Box-sc-wfmb7k-0 dZUXGn']"
).get_attribute('innerHTML').strip(),
'link' : driver.find_element('css selector',
"a[class='AnchorLink__StyledAnchor-sc-1ep83ox-0 inWMrO ResultListAdRowLayout___StyledClientRoutingAnchorLink-sc-1rmys2w-1 houIJO']"
).get_attribute('href'),
'size' : driver.find_element('xpath',
"//div/a/div[3]/div[1]/div[1]/span[1]"
).get_attribute('innerHTML').strip()
}
list_wohnung.append(question)
'title' : item.find_element('css selector',
"div[class='Box-sc-wfmb7k-0 dZUXGn']"
).get_attribute('innerHTML').strip(),

查找当前项,而不是驱动项。