如何抓取 - span aria-hidden="true" - 文本

问题描述 投票:0回答:0
弥敦道格林哈特查看弥敦道格林哈特的个人资料

我正在尝试抓取对特定 LinkedIn 帖子发表评论的人的名字。

我试过这段代码:

for i in soup.find_all("span",attrs = {"class" : "comments-post-meta__name-text hoverable-link-text mr1"}): print(i.find('span').get_text())

我得到的输出是: 'Nathan Greenhut 查看 Nathan Greenhut 的个人资料' 但我想要的输出是: 内森·格林哈特

python html web-scraping beautifulsoup hidden-field
© www.soinside.com 2019 - 2024. All rights reserved.