美文网首页
Beautiful Soup 查找嵌套string

Beautiful Soup 查找嵌套string

作者: BI罗 | 来源:发表于2021-02-19 12:15 被阅读0次
    <div><span class="scalar-ret">Scalar</span> A single value of any type.</div
    
    rv_div=rv.find_all("div")[0]
    for string in rv_div.strings:
        print(string)
    

    结果:

    Scalar
     A single value of any type.
    

    相关文章

      网友评论

          本文标题:Beautiful Soup 查找嵌套string

          本文链接:https://www.haomeiwen.com/subject/hpcaxltx.html