python如何提取html中div span 分隔的表格

python如何提取html中div span 分隔的表格

<div id="articlelistnew" class="all hs_list">

            <div class="dheader">

<span class="l1 a1">阅读</span><span class="l2 a2">评论</span><span class="l3 a3">标题</span>

<span class="l4 a4">作者</span>

<span class="l5 a5">最后更新</span>

</div>

<div class="articleh normal_post">

<span class="l1 a1">471</span>

<span class="l2 a2">2</span>

<span class="l3 a3">...</span>

<span class="l4 a4">...</span>

<span class="l5 a5">09-12 00:09</span>

</div>

<div class="articleh normal_post">

<span class="l1 a1">603</span>

<span class="l2 a2">3</span>

<span class="l3 a3">...</span>

<span class="l4 a4">...</span>

<span class="l5 a5">09-11 16:01</span>

</div>

</div>
请教如何提取上面的这个表格?


回答:

有一个库叫 bs4 值得一试

以上是 python如何提取html中div span 分隔的表格 的全部内容, 来源链接: utcz.com/p/938082.html

回到顶部