【发布时间】:2018-07-30 05:28:05
【问题描述】:
我一直在尝试找到一种模式,可以从下面的 >
<li><a href="/web/20151030182314/https://www.wiki.edu/trees/">Forest Trees Green</a></li>
<span class="field-content">Tress, Design & Plants</span></div>
<h3><a href="http://web.archive.org/web/20151030182501/http://www.latimes.com">Trees</>
<div class="tf-text">
Trees provide oxygen <a
<h4>Trees</h4>
<span class="field-content">Trees everywhere</span> </div></li>
</ul></div> </div>
<h3 class="secondary-feature-headline">Through European Security Initiative, Stanford focuses on changing trees</h3>
有人有什么建议吗? P.S 我不能使用 BeautifulSoup
【问题讨论】:
-
我猜你想看看 beautifulsoup (pythonforbeginners.com/beautifulsoup/beautifulsoup-4-python)
-
为什么要为此使用正则表达式? Python 有真正的 HTML 解析器。
标签: python regex python-3.x