【发布时间】:2017-08-13 10:44:41
【问题描述】:
所以我有例子
<body>
<div>I have a code
<img href"http://....jpg" />
<p>title image</p>
this so cool
</div>
</body>
那么我希望 OUTput 看起来像:
I have a code
<img href"http://....jpg" />
title image
this so cool
非常感谢您的帮助
【问题讨论】:
-
<img href"http://....jpg" />不是文本。所以你不能使用get_text()来获取它们。 -
好的,谢谢兄弟,你能帮帮我吗
-
您需要什么帮助?
-
你能在上面的例子中给出一些解决方案吗,谢谢
-
你需要
div标签内的所有东西?
标签: python beautifulsoup tags gettext except