python - 如何使用 BeautifulSoup Python 提取没有任何标签的 HTML 文本
问题描述
所以,这是我试图抓取的 HTML 代码-
<strong>Some Text</strong>
" Other Text I want"
<strong>Some other text</strong>
" Yet another Text I want"
另一个例子 -
<b>I can get:</b> This is what I also want<br />
<b>Another</b> This is another I want<br />
我尝试了 soup.find_all('b') 并得到了这个输出 -
<b>I can get:</b>
<b>Another</b>
但我也想要下一个文本。
解决方案
推荐阅读
- css - CSS 不再适用于 keter 和 nginx 反向代理设置
- flutter - 每个版本的 integration_test 都依赖于来自 sdk 的 flutter_driver any,它依赖于 crypto 2.1.5
- python - 用opencv查找手绘线的端点
- desktop-application - 在 Cytoscape Desktop 中过滤边缘
- google-sheets-formula - Goole Sheets - 使用多个文本条件转换 UTC 日期和时间的公式
- javascript - 盖茨比动态 slug
- django - 我应该如何在 ubuntu 20.04 上配置 mailman
- javascript - 如果在购物车或结帐页面中,如何将购物车图标的指针事件设置为无
- html - CSS: Select text between two elements
- node.js - embed 永远不会在 .then() 中添加字段