我想在另一个段落后面找一个段落,后面有一个特定的文本"Interested String ZZZ"
例如:
<p align="center"><strong><span style="text-decoration: underline;">Interested String ZZZ</span></strong></p>
<p style="text-align: justify;"><span style="font-size: small;">This is the paragraph string that i want to scrape out</span></p>
在python中如何做到这一点?你知道吗
使用
text
参数按文本内容匹配元素,然后使用find_next_sibling()
获取下一个<p>
同级元素:相关问题 更多 >
编程相关推荐