使用下面的html我想拉出2位數據並將它們添加到python列表中。每個大膽的文字他的馬名稱和以下是評論。Python:拉動粗體文本和下面的文本
<div id="ANALYSIS" class="tabContent tabSelected">A weak handicap that looked wide open.
<br>
<br> <b class="black">LADY MAKFI</b> showed vastly improved form to shed her maiden tag on this seasonal debut for a new yard. The filly offered little for Tony Martin last year, but did show some ability on her debut and is evidently capable when fresh.
She saw it out well and it´ll be interesting to see how she copes with a rise.
<br>
<br> <b class="black">Weardiditallgorong</b> went down fighting over this longer trip and probably improved again on her last-time-out second at Bath. This was her best effort yet on the AW.
<br>
<br> <b class="black">Chauvelin</b>, in second-time blinkers, turned in his most encouraging effort for some time and is certainly well treated on his best form.
<br>
<br> <b class="black">Happy Jack</b> not for the first time travelled easily until making heavy weather of it when asked for his effort. [David Orton]
<br>
<br>
<div id="resultRaceReport" class="hide"></div>
</div>
從上面的輸出我想它看起來像下面
[LADY MAKFI,表現出極大改善的形式闡明 這種季節性的首張處女標籤爲一個新的院子。馬丁去年爲菲尼克斯提供了很少的東西,但是在她首次亮相時確實展示了一些能力,並且在新鮮時顯然有能力。她看到它很好,稍後即會 有趣的,看看她是如何與一個崛起對應。]
[Weardiditallgorong,墜毀在這個較長的行程以及戰鬥 可能會再次對她的最後一次出第二個爲改善浴。這是又 她盡力而爲的AW]
[Chauvelin,在第二次眼罩,竟然在他最令人鼓舞 努力一段時間,肯定是好自己的最佳狀態的治療。]
[開心的傑克,不是第一次輕鬆地旅行,直到 被問及他的努力時惡劣的天氣。 [大衛·奧頓]
,但我只是不知道如何獲得所需的輸出(更其背後的邏輯)
我目前使用LXML刮含量,而且需要搭配大膽(馬名)對我的表,所以我可以大膽的後(文本)添加評論使用LXML我的數據庫
(http://stackoverflow.com/questions/11709079/parsing-html-using-python) –
@emma珀金斯[使用Python解析HTML]的可能的複製,我相信你按照你以前的問題使用lxml? –
道歉是的,我是(我會加入到問題中) - 這是更多的邏輯,而不是如何 –