如图 我想统计class=inheritance的数量为5 请问在beautiful soup4下要用什么代码段 不是获取class中内容 而是统计class名为inheritance的个数
获取网页的源代码不用BS4解析,将代码作为一个大的字符串直接搜索某个小字符串在代码里出现的次数
获取class=inheritance应该会返回一个列表,直接输出这个列表的长度len()就可以了