[英]beautifulsoup how to extract text from a specific class
I want to print a text from div that has this class="enrte_text_itempo" Can i print it just by typing this or someithng like this?我想从具有此类的 div 中打印文本 =“enrte_text_itempo” 我可以通过键入这个或类似的东西来打印它吗?
for div in soup.find_all("div", { class = "enrte_text_itempo"}):
print(div.get_text())
because i get an error that says invalid syntax and points my word:class因为我收到一个错误,指出语法无效并指出我的话:class
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.