【发布时间】:2013-10-17 15:19:03
【问题描述】:
我正在尝试使用BeautifulSoup 从以下html 获取一些文本:
test = '''<p class="author"><a href="./viewtopic.php?p=1829610"></a>by <strong>FinancialDave</a></strong> Thu Oct 17, 2013 12:52 am </p>'''
testsoup = BeautifulSoup(test)
testsoup.text
这会给我这样的结果:u'by FinancialDave Thu Oct 17, 2013 12:52 am
但是我想要的只是Thu Oct 17, 2013 12:52 am。有什么办法吗?
提前致谢。
【问题讨论】:
-
上下文信息不足。您为什么不简单地手动复制和粘贴日期?
标签: python html beautifulsoup