我正在尝试从这样的 Quora 问题中获取所有答案
from urllib.request import urlopen, Request
from bs4 import BeautifulSoup
import json
url = 'https://www.quora.com/What-is-it-like-to-live-in-London'
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html.parser')
answers = soup.find("script", {"type": "application/ld+json"})
data = json.loads(answers.string)
len(data["mainEntity"]["suggestedAnswer"])
但是,当我检查建议答案的长度时,我只得到 10 个项目。看来这 10 个项目是通过使用 soup.find("script", {"type": "application/ld+json"}) 过滤的。有没有办法得到所有的答案?