util.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:LFS201 作者: s-nt-s 项目源码 文件源码
def get_parrafos(soup):
    prfs= soup.find_all(['li','table'])
    ps = soup.find_all('p')
    for p in ps:
        if not p.span:
            prfs.append(p)
            continue
        flag=False
        for c in p.contents:
            if ((isinstance(c, bs4.NavigableString) or isinstance(c, unicode)) and not is_vacio(c)):
                flag=True
                break
        if flag:
            prfs.append(p)
    return prfs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号