抓取 Quora 时无法提取 JavaScript 个元素

Unable to Extract JavaScript Elements while Scraping Quora

我正在尝试使用 Python、BeautifulSoup 和 Selenium 从 Quora 中提取数据以进行分析。但是我无法提取页面上的 JavaScript 元素。我应该如何提取它们?

这里我只是想提取 Quora 个人资料的简介,但我没有收到单击 'more' 按钮后出现的文本。

~https://imgur.com/a/fTmeh1m

                # Extracting Bio
                driver.find_element_by_class_name('ui_qtext_more_link').send_keys(Keys.ENTER)
                bio = driver.find_element_by_class_name("ui_qtext_rendered_qtext").text

请使用下面的代码行首先点击 "more" 按钮,然后获取配置文件的扩展文本。

import time
//Fetch the more button element first
WebElement moreButton = driver.find_element_by_xpath("(//a[@class='ui_qtext_more_link'])[1]");    
//Click on the more button
moreButton.click();
time.sleep(3)
//Fetch the profileInfo element
WebElement profileInfo = driver.find_element_by_xpath("(//div[contains(@id,'expanded_content')]//span[@class='ui_qtext_rendered_qtext'])[1]");
//Store the bio in a string and use it further
String profileInfoBio = profileInfo.text;