Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

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

帮们看看这个页面如何提取内容?

帮忙看看这个页面,我想提取10和2这两个数字,是在下面的,但是里面是data-class,我使用beautifulsoup的要怎么选取呢?或者用其他解析器也可以,谢谢
image


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

1 Answer

0 votes
by (71.8m points)

希望可以帮助到你。

const domAll = document.querySelectorAll('.article-bar em')
domAll[0].innerText
domAll[1].innerText

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...