我使用BeautifulSoup從HTML頁面提取一些數據。我做的是:美麗的湯精確的標記數據
list=soup.find_all('td', {'align': 'left', 'valign': None})
print list[0]
它給了我
<td align="left">\n<h3>Name XYZ</h3>\n CTS SANSKRUTI LAYOUT, 90 FEET RAOD, THAKUR COMPLEX, <br/>KANDIVALI EAST,<br/>Mumbai MAHARASHTRA-400101</td>
但是我要像輸出:
Name: Name XYZ, Add: CTS SANSKRUTI LAYOUT, 90 FEET RAOD, THAKUR COMPLEX, KANDIVALI EAST, Mumbai MAHARASHTRA-400101
我該怎麼辦?