Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.3k views
in Technique[技术] by (71.8m points)

帮忙看看这样的页面如何解析?

如图,全部是<span>构成的,里面的class都一样,而且html标签也当做内容,这样爬出来都混在一起了,比如我想抓取的是“41岁”,结果“<span>”“=”“>”这些也都爬出来了。
image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你使用HTML内容解析器再解析一遍,取出其中的文本


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
...