I have the html file in the format of following. I want to parse it using python. However, I am ignorant of using the xml module. your suggestions are highly welcome.
Note: sorry for my ignorant again.The question is not specific. However, since i have been frustrated with such parsing script, i do want to get a concrete answer which is described by the answer person (thank you all) as the starting point. Hope you can understand.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Weibo Landscape: Historical Archive of 800 Verified Accounts</title>
</head>
<body>
<div><br>
related 1-th-weibo:<br>
mid:3365546399651413<br>
score:-5.76427445942 <br>
uid:1893278624 <br>
link:<a href="http://weibo.com/1893278624/xrv9ZEuLX" target="_blank">source</a> <br>
time:Thu Oct 06 17:10:59 +0800 2011 <br>
content: Zuccotti Park。 <br>
<br></div>
<div><br>
related 2-th-weibo:<br>
mid:3366839418074456<br>
score:-5.80535767804 <br>
uid:1813080181 <br>
link:<a href="http://weibo.com/1813080181/xs2NvxSxa" target="_blank">source</a> <br>
time:Mon Oct 10 06:48:53 +0800 2011 <br>
content:rt the tweet <br>
rtMid:3366833975690765 <br>
rtUid:1893801487 <br>
rtContent:#ows#here is the content and the link http://t.cn/aFLBgr <br>
<br></div>
</body>
</html>
Possible Duplicate:
Extracting text from HTML file using Python