I use lxml.html. Just as good, and MUCH faster. A pain to install though.<br><br><div class="gmail_quote">On Tue, Oct 20, 2009 at 6:32 PM, Anand Balachandran Pillai <span dir="ltr">&lt;<a href="mailto:abpillai@gmail.com">abpillai@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><br><div class="gmail_quote">On Thu, Sep 10, 2009 at 7:44 PM, Puneet Aggarwal <span dir="ltr">&lt;<a href="mailto:look4puneet@gmail.com" target="_blank">look4puneet@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks all for the suggestions. I think I will start with BeautifulSoup (3.0.7a) and will experiment with other suggested libs if it does not fit into my requirement or if I face issues with this. <br></blockquote><div><br>

 You are not going to believe this, but the creator of BeautifulSoup (Leonardo) <br> advised me to use the SGMLParser module in Python for parsing HTML.  This<br> was back in 2004 (or 2005) when I had written to him regarding BeautifulSoup<br>

 as parser in HarvestMan. He advised me to derive a wrapper from SGMLParser<br> and thats what I did.<br><br> In case you are interested, you can check out the HTML parser used in HarvestMan.<br>It is available at,<br><br>

 <a href="http://harvestman-crawler.googlecode.com/svn/trunk/HarvestMan/harvestman/lib/pageparser.py" target="_blank">http://harvestman-crawler.googlecode.com/svn/trunk/HarvestMan/harvestman/lib/pageparser.py</a><br><br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><div>
On Thu, Sep 10, 2009 at 7:07 PM, Baishampayan Ghose <span dir="ltr">&lt;<a href="mailto:b.ghose@gmail.com" target="_blank">b.ghose@gmail.com</a>&gt;</span> wrote:<br></div><div><div></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>&gt; Can anyone suggest me a good library for html parsing in python ?<br>
&gt; I googled a found few libararies BeautifulSoup, HTMLParser, SGMLParser etc.<br>
&gt;<br>
&gt; Can anyone suggest me which should I go for from your experience.<br>
<br>
</div>BeautifulSoup was OK, but now it&#39;s broken. Use lxml, it&#39;s very good.<br>
<br>
<a href="http://codespeak.net/lxml/" target="_blank">http://codespeak.net/lxml/</a><br>
<br>
Regards,<br>
BG<br>
<font color="#888888"><br>
<br>
--<br>
Baishampayan Ghose<br>
b.ghose at <a href="http://gmail.com" target="_blank">gmail.com</a><br>
</font><div><div></div><div>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org" target="_blank">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</div></div></blockquote></div></div></div><br>
<br>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org" target="_blank">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">--Anand<br><br><br><br>
</font><br>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Yuvi Panda T<br><a href="http://yuvisense.net">http://yuvisense.net</a><br><br>