【发布时间】:2018-10-22 19:47:45
【问题描述】:
我正在学习网页抓取。我想知道我们如何从下面的元素中获取参与者数量?
<li class="header-hero__stat header-hero__stat--participants">
::before
"255,590 Participants"
::after
</li>
我试过的代码
soupy = bs(html,'lxml')
ul = soupy.find('li',{'class':"header-hero__stats"})
返回None
【问题讨论】:
标签: css python-3.x web-scraping beautifulsoup