<div id="hide-editing-34536258">1/2 and 2/1 are reciprocals.</div> 这是我想要抓取的标签,我想打印1/2 and 2/1 are reciprocals. 我将通过get_text()打印它,但我不知道如何刮掉标签。 我能做这些。 find_all({"class":"hide-editing-3453658"} 但是有更多的标签需要抓取,它们在“高编辑-”之后有不同的数字。 我在数字里找不到任何规则。 有谁可以帮我?
for link in soup.find_all('a', {'class': 'post-tag'}): # href = link.get('href') for i in link: title = link.string print(title)
输出: python浮点舍入python非谷歌合作python flask python漂亮汤python nonetype python ubuntu等。
在从堆栈溢出站点提取数据时,我们在抓取问题的标签