【发布时间】:2020-12-29 10:03:54
【问题描述】:
我已经设法使用BeautifulSoup 获取脚本标签。然后我变成了json 对象。我想要的信息在data['x'] 内,但它卡在 b 标签之间。
示例:
<b>infoiwant</b><br>NA<br>infoinwant</br>columniwant: 123','<b>infoiwant</b><br>NA<br>columniwant: 123'</br>columniwant: 123
我将如何从这些 b 元素中获取信息
【问题讨论】:
-
.find_all('b') 应该足以获取 b 标签。 br 给其他人。
标签: python json selenium web-scraping beautifulsoup