开发者

how to extract a tag which does not have a particular attribute

开发者 https://www.devze.com 2023-03-15 15:48 出处:网络
I know that I can do: soup.findAll(\"p\", {\"class\" :\"something\"}) but I\'m l开发者_高级运维ooking for p-tags that DON\'t have any class. how do I make sure I only get p-tags with no class attri

I know that I can do:

soup.findAll("p", {"class" :"something"})

but I'm l开发者_高级运维ooking for p-tags that DON't have any class. how do I make sure I only get p-tags with no class attribute??


soup.findAll('p', {'class': None})
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号