Parsers Do Matter

posted Mar 22, 2013, 2:53 PM by John Lin
I have been scratching my head at how to parse out a list of ordered list using the BeautifulSoup library.  I am viewing the html through Firebug and typing out the Python code snippets through the ipython notebook.  For the longest time I was having inconsistent results, then I realized that the DOM being used by BeautifulSoup may not be what I was seeing on Firebug.  Sure enough, when I switched the BeautifulSoup parser to "lxml", the DOM now matches up.  Thank God!